Skip to content

Commit

Permalink
made the remarkable a little more green.
Browse files Browse the repository at this point in the history
  • Loading branch information
negonicrac committed Jun 11, 2010
1 parent 3fa01fa commit 7677a57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -26,7 +26,7 @@ def define_and_validate(options={})
define_and_validate(:protected => true)
@matcher = allow_mass_assignment_of
@matcher.matches?(@model)
@matcher.failure_message.should == 'Expected Product to allow mass assignment (Product is protecting category and title)'
@matcher.failure_message.should == 'Expected Product to allow mass assignment (Product is protecting title and category)'
end

it 'should set is_protected? message' do
Expand Down Expand Up @@ -99,7 +99,7 @@ def define_and_validate(options={})

lambda {
should_not allow_mass_assignment_of
}.should raise_error(RSpec::Expectations::ExpectationNotMetError, /Product made category and title accessible/)
}.should raise_error(RSpec::Expectations::ExpectationNotMetError, /Product made title and category accessible/)
end

it "should fail if nothing was declared but expected to be protected" do
Expand Down
Expand Up @@ -4,7 +4,7 @@
include ModelBuilder

before(:each) do
@model = define_model :product, :title => :string, :category => :string do
@model = define_model :product, :title => :string, :category => :string, :special => :boolean do
scope :recent, :order => 'created_at DESC'
scope :latest, lambda {|c| {:limit => c}}
scope :since, lambda {|t| where(['created_at > ?', t])}
Expand Down

0 comments on commit 7677a57

Please sign in to comment.