Sha256: bca61b4da5d2837c0d5c825613128a038f1b2ba6927b8ec065379b02fb674708

Contents?: true

Size: 696 Bytes

Versions: 22

Compression:

Stored size: 696 Bytes

Contents

require 'spec_helper'

describe FactoryGirl::Proxy do
  it_should_behave_like "proxy without association support"

  it "raises an error when asking for the result" do
    expect { subject.result(stub("assigner"), lambda {|instance| instance }) }.to raise_error(NotImplementedError)
  end
end

describe FactoryGirl::Proxy, ".ensure_strategy_exists!" do
  it "raises when passed a nonexistent strategy" do
    expect { FactoryGirl::Proxy.ensure_strategy_exists!(:nonexistent) }.to raise_error(ArgumentError, "Unknown strategy: nonexistent")
  end

  it "doesn't raise when passed a valid strategy" do
    expect { FactoryGirl::Proxy.ensure_strategy_exists!(:create) }.to_not raise_error
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
challah-0.6.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.6.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.5.4 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.5.3 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.5.2 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.5.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
factory_girl-2.5.2 spec/factory_girl/proxy_spec.rb
challah-0.4.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.4.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.3.5 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.3.4 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.3.3 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.3.2 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
challah-0.3.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/proxy_spec.rb
factory_girl-2.5.1 spec/factory_girl/proxy_spec.rb
challah-0.3.0 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/proxy_spec.rb
challah-0.2.1 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/proxy_spec.rb
challah-0.2.0 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/proxy_spec.rb
factory_girl-2.5.0 spec/factory_girl/proxy_spec.rb
factory_girl-2.4.2 spec/factory_girl/proxy_spec.rb