Sha256: 1d04611539706a16716d58136436d2d7f5b6656d32685b6bf24ec4ee7c688ce4

Contents?: true

Size: 816 Bytes

Versions: 16

Compression:

Stored size: 816 Bytes

Contents

# def it_acts_as_single_create_command(namespace, type)
#   plural = type.to_s.pluralize.to_sym
#   namespaced_type = "#{namespace.to_s.camelize}::#{type.to_s.camelize}"
#   model_class = "Models::#{namespaced_type}".constantize
#   serializer_class = "Serializers::#{namespaced_type}".constantize

#   let(:response) { subject.class.run(params) }

#   context "with valid params" do
#     context "when creating a single item" do
#       let(:item) { build("api_#{type}".to_sym) }
#       let(:params) { item }

#       it "returns the newly created #{type}" do
#         response.success?.should == true
#         response.result[:id].should_not == nil
#         model = model_class.find(response.result[:id])
#         response.result.should == serializer_class.as_json(model)
#       end
#     end
#   end
# end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
restpack_service-0.0.83 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.82 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.81 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.80 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.79 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.78 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.77 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.76 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.75 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.74 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.73 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.72 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.71 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.70 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.69 lib/restpack_service/support/matchers/single_create_command.rb
restpack_service-0.0.68 lib/restpack_service/support/matchers/single_create_command.rb