Sha256: 41122aebf5f11776f7e9fd1b2936358538da9c33f88cee95750c831faba17e6d

Contents?: true

Size: 481 Bytes

Versions: 19

Compression:

Stored size: 481 Bytes

Contents

require File.dirname(__FILE__) + '/../../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

19 entries across 19 versions & 4 rubygems

Version Path
dchelimsky-rspec-rails-1.1.10 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.1 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.2 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.3 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.6 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.7 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.8 spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.9 spec/rails/matchers/should_change_spec.rb
pictrails-0.5.0 vendor/plugins/rspec-rails/spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.11 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.10 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.6 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.5 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.8 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.9 spec/rails/matchers/should_change_spec.rb
rspec-rails-1.1.7 spec/rails/matchers/should_change_spec.rb
typo-5.1.98 vendor/plugins/rspec-rails/spec/rails/matchers/should_change_spec.rb
typo-5.2 vendor/plugins/rspec-rails/spec/rails/matchers/should_change_spec.rb