On Jul 9, 2010, at 8:06 AM, David Chelimsky wrote:
> On Jul 9, 2010, at 6:59 AM, garren wrote:
>>
>>
>> On Jul 7, 12:34 pm, David Chelimsky wrote:
>>> On Jul 7, 2010, at 5:26 AM, Trevor Lalish-Menagh wrote:
>>>
> Did you know about the rspec-dev meta project?
>>>
> http://github.com/r
On 2010-07-09 8:38 AM, Wincent Colaiuta wrote:
El 09/07/2010, a las 14:29, Frank J. Mattia escribió:
it "should explicitly set created_by" do
controller.stub(:current_user) { mock_user }
mock_order.should_receive(:created_by=).with(mock_user)
post :create
end
This is my newly working spe
> >>> it "should explicitly set created_by" do
> >>> controller.stub(:current_user) { mock_user }
> >>> mock_order.should_receive(:created_by=).with(mock_user)
> >>> post :create
> >>> end
>
> >>> This is my newly working spec. Does this look well thought out or is
> >>> there some glaring pitfa
On Mon, Jul 5, 2010 at 1:26 PM, David Chelimsky wrote:
> I just pushed what I believe to be a fix for this - please try pointing
> Gemfile to the git repos again. It should work if you do this with all of
> them:
>
> gem "rspec-rails",:git => "git://github.com/rspec/rspec-rails.git"
> gem
I've been trying to test a very simple action on a controller with
this setup:
rspec 1.3.0
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
Rails 2.3.8
devise 1.0.8
And this is the test:
before :each do
@member = Factory.create(:member)
sign_in @member
@person
El 09/07/2010, a las 14:29, Frank J. Mattia escribió:
>>> it "should explicitly set created_by" do
>>> controller.stub(:current_user) { mock_user }
>>> mock_order.should_receive(:created_by=).with(mock_user)
>>> post :create
>>> end
>>
>>> This is my newly working spec. Does this look well tho
On Jul 9, 2010, at 6:59 AM, garren wrote:
>
>
> On Jul 7, 12:34 pm, David Chelimsky wrote:
>> On Jul 7, 2010, at 5:26 AM, Trevor Lalish-Menagh wrote:
>>
Did you know about the rspec-dev meta project?
>>
http://github.com/rspec/rspec-dev
>>
>>> That is great. I should have looked for
> > > Seems reasonable to me. You could test with either an interaction based
> > > approach (use mocks and stubs to confirm that @object receives the
> > > "created_by" message with the expected param) or a state based approach
> > > (hit the controller action and then inspect the system state aft
I've followed the instructions to install the dev environment, when I
run rake install I get this for the rspec-rails:
cp ./templates/Gemfile ./tmp/example_app/
rake rails:template LOCATION='../../templates/generate_stuff.rb'
(in /Users/garren/webdev/rspec-dev/repos/rspec-rails/tmp/example_app)
The updated_at has class ActiveSupport::TimeWithZone
v.updated_at.should == f.updated_at fails
v.updated_at.to_datetime.should == f.to_datetime.updated_at fails
v.updated_at.to_s.should == f.updated_at.to_s works
v.updated_at.to_i.should == f.updated_at.to_i works
And adding this method to the m
David Chelimsky wrote:
> On Jul 8, 2010, at 5:04 AM, Juanma Cervera wrote:
>
>> end.
>>
>> FAILS
>>
>> This fails because the object expected is different from the object
>> gotten, and the only difference are the BigDecimal attributes, that are
>> different objects, even though they have the sa
El 09/07/2010, a las 04:25, Frank J. Mattia escribió:
>> Seems reasonable to me. You could test with either an interaction based
>> approach (use mocks and stubs to confirm that @object receives the
>> "created_by" message with the expected param) or a state based approach (hit
>> the controlle
12 matches
Mail list logo