Sha256: 0eb77f7e584d3970b7b621d045bf1ae751e8b667d1c380032a99978dfefb8576
Contents?: true
Size: 754 Bytes
Versions: 1
Compression:
Stored size: 754 Bytes
Contents
require 'spec_helper' RSpec.describe ResourceKit::ResourceCollection do subject(:collection) { ResourceKit::ResourceCollection.new } describe '#action' do it 'yields an action to the block' do expect {|b| collection.action(:all, &b) }.to yield_with_args(instance_of(ResourceKit::Action)) end it 'adds the action to the collection' do action = collection.action :all expect(collection).to include(action) end end describe '#find_action' do it 'returns the action with the name passed' do collection.action(:all) retrieved_action = collection.find_action(:all) expect(retrieved_action).to be_kind_of(ResourceKit::Action) expect(retrieved_action.name).to eq(:all) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resource_kit-0.0.1 | spec/lib/resource_kit/resource_collection_spec.rb |