Permalink
Browse files

Marked a spec as pending under rbx

* It looks like rbx and do_sqlite3 are mangling one of the queries
  that is executed in TaggedModel#update_tags, causing spec failures.
  • Loading branch information...
1 parent d4f5c3f commit d6940fa71afc9c347bc41c938bfa08f41cebee1b @dkubb dkubb committed Feb 25, 2011
Showing with 22 additions and 18 deletions.
  1. +20 −18 spec/dm-tags/taggable_spec.rb
  2. +2 −0 spec/spec_helper.rb
@@ -33,24 +33,26 @@
it "should set the associated collection of tags to those whose names
are in the tag list upon saving, creating and deleting as necessary" do
- tag1 = Tag.create(:name => 'tag1')
- tag2 = Tag.create(:name => 'tag2')
- tag3 = Tag.create(:name => 'tag3')
- @taggable = TaggedModel.new
- @taggable.tag_list = 'tag1, tag2, tag3'
- @taggable.save.should be(true)
- @taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2, tag3]
- @taggable.tag_list = 'tag1, tag2'
- @taggable.save.should be(true) # Should dirty the model when changed.
- pending do
- @taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2]
- end
- @taggable.tag_list = 'tag3, tag4'
- @taggable.save.should be(true)
- @taggable = @taggable.model.get(*@taggable.key)
- pending do
- @taggable.tags.sort_by{|tag| tag.id}.should == [tag3, Tag.first(:name => 'tag4')]
- @taggable.skills.sort_by{|skill| skill.id}.should_not == [tag3, Tag.first(:name => 'tag4')]
+ pending_if 'rubinius causes the queries to become mangled', defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' do
+ tag1 = Tag.create(:name => 'tag1')
+ tag2 = Tag.create(:name => 'tag2')
+ tag3 = Tag.create(:name => 'tag3')
+ @taggable = TaggedModel.new
+ @taggable.tag_list = 'tag1, tag2, tag3'
+ @taggable.save.should be(true)
+ @taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2, tag3]
+ @taggable.tag_list = 'tag1, tag2'
+ @taggable.save.should be(true) # Should dirty the model when changed.
+ pending do
+ @taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2]
+ end
+ @taggable.tag_list = 'tag3, tag4'
+ @taggable.save.should be(true)
+ @taggable = @taggable.model.get(*@taggable.key)
+ pending do
+ @taggable.tags.sort_by{|tag| tag.id}.should == [tag3, Tag.first(:name => 'tag4')]
+ @taggable.skills.sort_by{|skill| skill.id}.should_not == [tag3, Tag.first(:name => 'tag4')]
+ end
end
end
View
@@ -1,5 +1,6 @@
require 'dm-core/spec/setup'
require 'dm-core/spec/lib/adapter_helpers'
+require 'dm-core/spec/lib/pending_helpers'
require 'dm-tags'
require 'dm-migrations'
@@ -10,6 +11,7 @@
Spec::Runner.configure do |config|
config.extend(DataMapper::Spec::Adapters::Helpers)
+ config.include(DataMapper::Spec::PendingHelpers)
config.before do
Object.send(:remove_const, :TaggedModel) if defined?(TaggedModel)

0 comments on commit d6940fa

Please sign in to comment.