Sha256: b16e77070e54d396f727af89409875ad5b2c020f13d67d848cd4f733ba226f9c

Contents?: true

Size: 449 Bytes

Versions: 17

Compression:

Stored size: 449 Bytes

Contents

require 'spec_helper'

describe "should change" do
  describe "handling association proxies" do
    it "should match expected collection with proxied collection" do
      person = Person.create!(:name => 'David')
      koala = person.animals.create!(:name => 'Koala')
      zebra = person.animals.create!(:name => 'Zebra')
      
      lambda {
        person.animals.delete(koala)
      }.should change{person.animals}.to([zebra])
    end
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-rails-1.3.4/spec/spec/rails/matchers/should_change_spec.rb
richzhou-rspec-rails-1.3.4 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.4 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.3 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.3.rc spec/spec/rails/matchers/should_change_spec.rb
exception2db-0.0.1 test/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-w-factory_girl-1.3.2.1 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-w-factory_girl-1.3.2 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.2 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.1 spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.3.0 spec/spec/rails/matchers/should_change_spec.rb
hubbub-0.0.11 lib/vendor/plugins/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
hubbub-0.0.10 lib/vendor/plugins/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
hubbub-0.0.9 lib/vendor/plugins/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
hubbub-0.0.8 lib/vendor/plugins/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
hubbub-0.0.6 lib/vendor/plugins/rspec-rails/spec/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.2.9 spec/spec/rails/matchers/should_change_spec.rb