Skip to content

Commit

Permalink
fix tests for 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
artemk committed Dec 8, 2011
1 parent a93617d commit 30879f4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@

its(:language_list) { should == ['ruby', '.net']}
its(:cached_language_list) { should == 'ruby, .net' } # passes
its(:instance_variables) { should include('@language_list') }
its(:instance_variables) { should include((RUBY_VERSION < '1.9' ? '@language_list' : :@language_list)) }
end

context 'status taggings cache after update' do
Expand All @@ -335,8 +335,9 @@
its(:status_list) { should == ['happy', 'married'] }
its(:cached_status_list) { should == 'happy, married' } # fails
its(:cached_status_list) { should_not == '' } # fails, is blank
its(:instance_variables) { should include('@status_list') }
its(:instance_variables) { should_not include('@statu_list') } # fails, note: one "s"
its(:instance_variables) { should include((RUBY_VERSION < '1.9' ? '@status_list' : :@status_list)) }
its(:instance_variables) { should_not include((RUBY_VERSION < '1.9' ? '@statu_list' : :@statu_list)) } # fails, note: one "s"

end

context 'glass taggings cache after update' do
Expand All @@ -348,8 +349,14 @@
its(:glass_list) { should == ['rectangle', 'aviator'] }
its(:cached_glass_list) { should == 'rectangle, aviator' } # fails
its(:cached_glass_list) { should_not == '' } # fails, is blank
its(:instance_variables) { should include('@glass_list') }
its(:instance_variables) { should_not include('@glas_list') } # fails, note: one "s"
if RUBY_VERSION < '1.9'
its(:instance_variables) { should include('@glass_list') }
its(:instance_variables) { should_not include('@glas_list') } # fails, note: one "s"
else
its(:instance_variables) { should include(:@glass_list) }
its(:instance_variables) { should_not include(:@glas_list) } # fails, note: one "s"
end

end
end
end
Expand Down

0 comments on commit 30879f4

Please sign in to comment.