spec/model/base_spec.rb in yammer-client-0.1.1 vs spec/model/base_spec.rb in yammer-client-0.1.2
- old
+ new
@@ -1,10 +1,10 @@
require File.expand_path('../../spec_helper', __FILE__)
describe Yammer::Base do
class DummyModel < Yammer::Base
- attr_accessor_deffered :first_name, :last_name
+ attr_accessor_deffered :first_name, :last_name
end
class Yammer::Client
def update_dummy_model(id, opts={})
put("/api/v1/dummy_models/#{id}", opts)
@@ -121,11 +121,11 @@
Yammer.should_receive(:update_dummy_model).with(42, hash_including(
:first_name =>'john',
:last_name => 'smith')
).and_return(double('Response', :success? => true, :created? => true, :body => {:id => 2}))
subject.first_name = 'john'
- subject.last_name = 'smith'
+ subject.last_name = 'smith'
subject.save
end
end
context 'unmodified new model' do
@@ -141,12 +141,13 @@
context 'modified new model' do
subject { DummyModel.new(:first_name => 'jim', :last_name => 'peters') }
it 'should create model' do
- Yammer.should_receive(:create_dummy_model).with(
- hash_including(:first_name =>'john', :last_name => 'peters')
- ).and_return(double('Response', :success? => true, :created? => true, :body => {:id => 2}))
+ Yammer.should_receive(:create_dummy_model).with({
+ :first_name =>'john',
+ :last_name => 'peters'
+ }).and_return(double('Response', :success? => true, :created? => true, :body => {:id => 2}))
subject.first_name = 'john'
subject.save
end
end
end
\ No newline at end of file