before do
@weather = mock_model(Weather)
Weather.stub!(:find).and_return([...@weather])
end
I saw this code on peepcode, but I'm a little confused the
and_return([...@weather]).
mostly, we just and_return(@weather), don't we? so, what is the meaning
of and_return([...@weather]) ?
--
Posted v
Thanks David!
I will try the new matcher after I migrate to rspec 1.2.x :) But
seems a lot easier to create . Really liking it!
Emmanuel
On Mar 25, 2009, at 6:00 PM, David Chelimsky wrote:
On Wed, Mar 25, 2009 at 7:32 PM, Zach Dennis
wrote:
On Wed, Mar 25, 2009 at 7:18 PM, Emmanuel Pin
I havn't done this myself, but would
controller.stub!(:around_filter_method).and_yield work?
On Wed, Mar 25, 2009 at 4:15 PM, Alex wrote:
> Hi all, any of you guys had success specking out a around_filter? I
> tried a few things like controller.should_receive
> (:around_filter_method), controll
Ben Mabey wrote:
>
> With that step definition you don't need to pollute all of your features
> with the steps to login. As it turns out you can have the best of both
> worlds. Meaning, if you want webrat to use the faster post method only
> for non-selenium runs you can. Like so:
>
> Given
On Wed, Mar 25, 2009 at 7:32 PM, Zach Dennis wrote:
> On Wed, Mar 25, 2009 at 7:18 PM, Emmanuel Pinault wrote:
>> Hi,
>>
>>
>> Is there way to generate a better error messages when I have a matcher in my
>> step like
>>
>> 1.should == 0 => would fail with expected 1, got 0
>>
>> I would like to
On Wed, Mar 25, 2009 at 7:18 PM, Emmanuel Pinault wrote:
> Hi,
>
>
> Is there way to generate a better error messages when I have a matcher in my
> step like
>
> 1.should == 0 => would fail with expected 1, got 0
>
> I would like to add more details to that error? Especially , in my case ,I
> am
2009/3/25 Ben Mabey :
>
> On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote:
>
> Big news for all Java programmers out there.
> Now you can use Cucumber with pure Java!
>
> That's right, you don't have to write a single line of Ruby! (1)
> All of your step definitions can be written as annotated me
Balint Erdi wrote:
Ben Mabey wrote:
Couple things I'd like to point out. In your enhanced.rb you don't need
to do the Before hook yourself. You can just require
'database_cleaner/cucumber'. I've updated your gist to use that.
In your plain.rb it seems like you are trying to truncate your
Balint Erdi wrote:
Hey Ben, thanks a lot.
The problem I am experiencing now is that information stored in the
session does not seem to be retained between steps (again, only in the
case of selenium sessions, plain sesssion work fine). So the login
function works fine now but when I go to anot
> Hey Ben, thanks a lot.
>
> The problem I am experiencing now is that information stored in the
> session does not seem to be retained between steps (again, only in the
> case of selenium sessions, plain sesssion work fine). So the login
> function works fine now but when I go to another page
Hi,
Is there way to generate a better error messages when I have a matcher
in my step like
1.should == 0 => would fail with expected 1, got 0
I would like to add more details to that error? Especially , in my
case ,I am using the include? matcher.
Thanks
Emmanuel
_
On Wed, Mar 25, 2009 at 2:49 PM, Tadatoshi Takahashi
wrote:
> Stephen Eley wrote:
>> On Wed, Mar 25, 2009 at 3:29 PM, Tadatoshi Takahashi
>> wrote:
>>>
>>> P.S.
>>> It seems that autospec is run against test database and that "rake spec"
>>> is run against development database.
>
> Is there any o
On Wed, Mar 25, 2009 at 5:49 PM, Tadatoshi Takahashi
wrote:
>
> I have never set RAILS_ENV anywhere.
> To make sure, I have looked at .profile but RAILS_ENV is not set there.
>
> Is there any other place where that RAILS_ENV is getting set?
I don't know. But the way to test it from the command l
Stephen Eley wrote:
> On Wed, Mar 25, 2009 at 3:29 PM, Tadatoshi Takahashi
> wrote:
>>
>> P.S.
>> It seems that autospec is run against test database and that "rake spec"
>> is run against development database.
>> How can I resolve this problem?
>
> The first thing I'd check would be whether you
Ben Mabey wrote:
> Couple things I'd like to point out. In your enhanced.rb you don't need
> to do the Before hook yourself. You can just require
> 'database_cleaner/cucumber'. I've updated your gist to use that.
> In your plain.rb it seems like you are trying to truncate your database
> just o
On Mar 25, 2009, at 1:37 PM, Phor Gruber wrote:
I added:
- validates_presence_of :attribute
To my model.
The test now passes.
Congrats! It took longer than it usually does, but you just
experienced the red and green parts of the red/green/refactor cycle.
Cheers,
David
yay!!
Thanks
On Wed, Mar 25, 2009 at 3:29 PM, Tadatoshi Takahashi
wrote:
>
> P.S.
> It seems that autospec is run against test database and that "rake spec"
> is run against development database.
> How can I resolve this problem?
The first thing I'd check would be whether you have RAILS_ENV defined
in your .p
Hi all, any of you guys had success specking out a around_filter? I
tried a few things like controller.should_receive
(:around_filter_method), controller.stub!(:around_filter_method) but
without success. In fact, the method is always executed even though I
stubed it. What I find strange is that I a
Den 25. mars. 2009 kl. 18.18 skrev Ben Mabey :
On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote:
Big news for all Java programmers out there.
Now you can use Cucumber with pure Java!
That's right, you don't have to write a single line of Ruby! (1)
All of your step definitions can be writt
Tadatoshi Takahashi wrote:
> Hi,
>
> I started to use RSpec and RSpec-rails 1.2.0 last week when I upgraded
> to
> Ruby on Rails 2.3.2.
> At that time, "ruby script/generate rspec" hang but autospec and "rake
> spec"
> were successful.
>
> Yesterday, I updated to RSpec and RSpec-rails 1.2.2.
>
Hi,
I started to use RSpec and RSpec-rails 1.2.0 last week when I upgraded to
Ruby on Rails 2.3.2.
At that time, "ruby script/generate rspec" hang but autospec and "rake spec"
were successful.
Yesterday, I updated to RSpec and RSpec-rails 1.2.2.
This time, "ruby script/generate rspec" was success
Just did a little bit exploration. Found out
http://github.com/carlosbrando/remarkable/tree/master plugin I use actually
cause the problem. This plugin also broke spec:server:start rake task as
well. :-(
On Thu, Mar 19, 2009 at 5:03 PM, Yi wrote:
> I thought be_something is actually handled by r
I added:
- validates_presence_of :attribute
To my model.
The test now passes.
yay!!
Thanks David.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote:
Big news for all Java programmers out there.
Now you can use Cucumber with pure Java!
That's right, you don't have to write a single line of Ruby! (1)
All of your step definitions can be written as annotated methods in
POJOs (Plain Old Java
Big news for all Java programmers out there.
Now you can use Cucumber with pure Java!
That's right, you don't have to write a single line of Ruby! (1)
All of your step definitions can be written as annotated methods in POJOs
(Plain Old Java Objects).
To get a taste of what this looks like, check
Hi,
I'm using the Searchlogic plugin. Since I have added the search form in the
index template,
the view spec doesn't work anymore.
Controller
-
def index
@search = PlPlanning.new_search(params[:search])
@search.order_by = :id
@pl_plannings, @count = @search.all, @search.count
26 matches
Mail list logo