Sha256: 547f2cda42cc09396d89edad2aa6a8f4c0ffd983a2c98085a589bf29144fbbf5

Contents?: true

Size: 484 Bytes

Versions: 35

Compression:

Stored size: 484 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

35 entries across 35 versions & 5 rubygems

Version Path
cavalle-rspec-rails-1.2.2.0.1 spec/spec/rails/matchers/should_change_spec.rb
cavalle-rspec-rails-1.2.2.0.2 spec/spec/rails/matchers/should_change_spec.rb
cavalle-rspec-rails-1.2.3.1 spec/spec/rails/matchers/should_change_spec.rb
cavalle-rspec-rails-1.2.4.0.1 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.4 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.5 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.6 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.11.7 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.12 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.1 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.13 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.2 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.3 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.4 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.5 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.6 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.7 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.8 spec/spec/rails/matchers/should_change_spec.rb
dchelimsky-rspec-rails-1.1.99.9 spec/spec/rails/matchers/should_change_spec.rb
mcmire-rspec-rails-1.1.99.9 spec/spec/rails/matchers/should_change_spec.rb