Permalink
Browse files

Pass boolean literals rather than symbols

  • Loading branch information...
1 parent 21faf2c commit a84244642b96b6229f42b133fe9a9c498a6acccd @calebthompson committed Jul 9, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 spec/shoulda/active_record/association_matcher_spec.rb
@@ -104,15 +104,15 @@
define_model :child, :parent_id => :integer do
belongs_to :parent, :autosave => true
end
- Child.new.should @matcher.autosave(:true)
+ Child.new.should @matcher.autosave(true)
end
it "should reject an association with a valid :autosave option" do
define_model :parent, :adopter => :boolean
define_model :child, :parent_id => :integer do
belongs_to :parent, :autosave => false
end
- Child.new.should_not @matcher.autosave(:true)
+ Child.new.should_not @matcher.autosave(true)
end
end
@@ -262,15 +262,15 @@
define_model :parent do
has_many :children, :autosave => true
end
- Parent.new.should @matcher.autosave(:true)
+ Parent.new.should @matcher.autosave(true)
end
it "should reject an association with a valid :autosave option" do
define_model :child, :parent_id => :integer
define_model :parent do
has_many :children, :autosave => false
end
- Parent.new.should_not @matcher.autosave(:true)
+ Parent.new.should_not @matcher.autosave(true)
end
it "should accept an association with a nonstandard reverse foreign key, using :inverse_of" do
@@ -402,15 +402,15 @@
define_model :person do
has_one :detail, :autosave => true
end
- Person.new.should @matcher.autosave(:true)
+ Person.new.should @matcher.autosave(true)
end
it "should reject an association with a valid :autosave option" do
define_model :detail, :person_id => :integer, :disabled => :boolean
define_model :person do
has_one :detail, :autosave => false
end
- Person.new.should_not @matcher.autosave(:true)
+ Person.new.should_not @matcher.autosave(true)
end
end
@@ -501,7 +501,7 @@
end
define_model :people_relative, :person_id => :integer,
:relative_id => :integer
- Person.new.should @matcher.autosave(:true)
+ Person.new.should @matcher.autosave(true)
end
it "should reject an association with a bad :autosave option" do
@@ -511,7 +511,7 @@
end
define_model :people_relative, :person_id => :integer,
:relative_id => :integer
- Person.new.should_not @matcher.autosave(:true)
+ Person.new.should_not @matcher.autosave(true)
end
end
end

0 comments on commit a842446

Please sign in to comment.