Hey,
I've just started using rspec-rails 1.2 and the bypass rescue
declaration is wonderful - by default I tend to write controller which
raise exceptions (in exceptional circumstances), along with before-
filters as guard clauses, so being able to switch off rescue from
(which I properly
Zach Dennis wrote:
> On Thu, Mar 19, 2009 at 5:28 AM, jazzez ravi
> wrote:
>> �before(:each) do
>> class Bowling
>>
>> require 'spec' --> �No Error But also no output mentioned as per that
>> website.
>>
>> Please anyone help to continue that program.
>
> Try to put this at the top:
>
> require
On Thu, Mar 19, 2009 at 10:20 PM, Stephen Eley wrote:
> 2009/3/19 Rick DeNatale :
>> Even 'should be' is a bit grating. I'm tempted to write a pair of matchers
>> like be_truthy and be_falsy, but I was wondering what other RSpec users have
>> to say.
>
what_follows.should be_brilliant
> should
David Chelimsky wrote:
> On Thu, Mar 19, 2009 at 4:28 AM, jazzez ravi
> wrote:
>> �before(:each) do
>> class Bowling
>>
>>>ruby bowling_spec.rb --format specdoc
>
> Use the spec command (that's what's there on http://rspec.info):
>
> spec bowling_spec.rb --format specdoc
>
> Cheers,
> David
H
Where in the scenario object is the name stored?
Cheers.
Nigel
walketim wrote:
>
> That did the trick. Thanks Aslak! Took a little while to figure out
> where it was in the Scenario object but it was pretty straight forward
> from there.
>
> T
>
> On Wed, Mar 11, 2009 at 10:21 AM, aslak he
2009/3/19 Rick DeNatale :
> Even 'should be' is a bit grating. I'm tempted to write a pair of matchers
> like be_truthy and be_falsy, but I was wondering what other RSpec users have
> to say.
should be || should_not be: that is the expectation:
Whether 'tis nobler in the parser to interpret
The o
I hate should/should_not be and so if I really *have* to do it then I
just throw a !! in the method and get back a real boolean. Not ideal,
but it works.
HOWEVER
Predicate matchers *do* accept args, and in the specific example you
gave, the have matcher comes to the rescue. Check out these exam
2009/3/19 Rick DeNatale :
> I like to avoid over-constraining specifications, so for example of methods
> which return 'boolean' values, I prefer to test either truthiness (anything
> but false or nil), or falsiness (either false or nil).
> This isn't an issue true predicate methods which are of th
I like to avoid over-constraining specifications, so for example of methods
which return 'boolean' values, I prefer to test either truthiness (anything
but false or nil), or falsiness (either false or nil).
This isn't an issue true predicate methods which are of the right form to
use be_whatever (a
I thought be_something is actually handled by rspec class Be. be_blank
essentially asks the object blank? predicate. Not that there is a "be_blank"
method declared anywhere.
Anyway, require 'spec/expectations' doesn't solve the problem. I will look
into this. Thanks
Yi
On Thu, Mar 19, 2009 at 10
On 18 Mar 2009, at 19:16, aslak hellesoy wrote:
I'm happy to announce the release of Cucumber 0.2.0.
Thanks! I just can't exaggerate how much of a difference Cucumber
(and RSpec) makes to me.
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net
I think writing features is a new art form and as such we just don't know
answers to questions like this yet. After a while we might be able to move
towards a consensus given certain criteria, and people might be able to come
up with rules of thumb that help (i.e. if its got more than 7 scenarios
c
On Thu, Mar 19, 2009 at 9:44 AM, Lenny Marks wrote:
> These scenarios are each distinct things so to me are 'features' in a way
> but they may also be trivial to implement, so using any kind of 'a feature
> should generally take n days/weeks to implement' guideline would make that
> smell.
I do
On Mar 19, 2009, at 9:59 AM, aslak hellesoy wrote
Thanks ! I started to digg last night into it. Saw one thing wrong
in the HTML reported where the Span gets escaped ;)
Yep I have noticed that too - would be great if you could figure out
how to not have it escaped!
Not sure it is the be
On Mar 19, 2009, at 9:59 AM, aslak hellesoy wrote:
Thanks ! I started to digg last night into it. Saw one thing wrong
in the HTML reported where the Span gets escaped ;)
Yep I have noticed that too - would be great if you could figure out
how to not have it escaped!
Working on it and
I'm curious what other people's thoughts are about when to use
Features vs. Scenarios and how much it matters. I'm getting the sense
that the line is a thin one, and has more to do with complexity/time
to develop than anything else. I had originally enforced a fairly
rigid definition of 'Sc
Hi all,
I'm having the same problem as Tobi and I wanted to try Tobi mock solution
but unfortunately it does not work for me.
Here is a trivial example I want to test:
module ActiveRecord
class Base
def self.count_by_params(params = {}, options = {})
scoped_by_params(params).co
2009/3/19 Emmanuel Pinault
>
> On Mar 18, 2009, at 11:22 PM, aslak hellesoy wrote:
>
>
>
> On Wed, Mar 18, 2009 at 4:08 PM, Emmanuel Pinault wrote:
>
>> Great! Is there section for the new hook on reporting? I used the old
>> reporting to customized some of our HTML reports and wonder if you hav
On Mar 18, 2009, at 11:22 PM, aslak hellesoy wrote:
On Wed, Mar 18, 2009 at 4:08 PM, Emmanuel Pinault
wrote:
Great! Is there section for the new hook on reporting? I used the
old reporting to customized some of our HTML reports and wonder if
you have the new hooks documented somewhere
celerity version 0.0.6 has been released!
* http://github.com/jarib/celerity/tree
* http://celerity.rubyforge.org
Celerity is a JRuby wrapper around HtmlUnit - a headless Java browser with
JavaScript support. It provides a simple API for programmatic navigation
through web applications. Celerit
On Mar 19, 2009, at 10:30 AM, David Chelimsky wrote:
On Mar 19, 2009, at 7:59 AM, Evgeny Bogdanov > wrote:
just upgraded to 1.2.0
the following code works now:
template.stub!(:render).with(hash_including(:partial => "children/
child"))
template.should_receive(:render).with(hash_including
Right, you need to add
require 'spec/expectations'
because Cucumber doesn't know about RSpec's matchers by default.
Pat
2009/3/19 Yi :
> This is my env.rb
>
> # Sets up the Rails environment for Cucumber
> ENV["RAILS_ENV"] ||= "test"
> require File.expand_path(File.dirname(__FILE__) +
> '/../../
This is my env.rb
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) +
'/../../config/environment')
require 'cucumber/rails/world'
require 'cucumber/formatters/unicode' # Comment out this line if you don't
want Cucumber Unicode
2009/3/19 Yi
> I have a step definition like this:
>
> Then "the account should be created" do
> account = Account.find_by_name("my shiny new account")
> p account.class
> account.should_not be_blank
> end
>
> When running this step, I got the error message:
>
> Account(id: integer, name: s
> Basically, there are two situation.
> 1) I want to check if a function was called and I want to execute the
> function code
I don't think that's possible. Setting a method expectation (Eg:
template.should_receive(:render)) automatically stubs #render.
> 2) I want to check if a function was call
On Mar 19, 2009, at 7:59 AM, Evgeny Bogdanov
wrote:
just upgraded to 1.2.0
the following code works now:
template.stub!(:render).with(hash_including(:partial => "children/
child"))
template.should_receive(:render).with(hash_including(:partial =>
"children/child"))
The only question th
I have a step definition like this:
Then "the account should be created" do
account = Account.find_by_name("my shiny new account")
p account.class
account.should_not be_blank
end
When running this step, I got the error message:
Account(id: integer, name: string, state: string, next_renewal
just upgraded to 1.2.0
the following code works now:
template.stub!(:render).with(hash_including(:partial => "children/
child"))
template.should_receive(:render).with(hash_including(:partial =>
"children/child"))
The only question that is left for me is about Nick's words:
"If you set a m
On Thu, Mar 19, 2009 at 5:28 AM, jazzez ravi wrote:
> Hi All,
>
> 1. Just now I installed rspec1.2.0 and dependencies
>
> 2. Tried the 2 programs mentioned in http://rspec.info/.
>
> # bowling_spec.rb
> require 'bowling'
>
> describe Bowling do
> before(:each) do
> �...@bowling = Bowling.new
>
On Thu, Mar 19, 2009 at 9:15 AM, Zach Dennis wrote:
> On Thu, Mar 19, 2009 at 8:46 AM, Zhenning Guan wrote:
>> usually, I just use this way.
>>
>> =
>> @weather = mock_model(Weather)
>> =
>>
>> but recently I saw this. so what's the :to_param and :save options
>> meaning?
>>
>> ==
>>
On Thu, Mar 19, 2009 at 8:46 AM, Zhenning Guan wrote:
> usually, I just use this way.
>
> =
> @weather = mock_model(Weather)
> =
>
> but recently I saw this. so what's the :to_param and :save options
> meaning?
>
> ==
> @weather = mock_model(Weather, :to_param => "1", :save => true)
>
usually, I just use this way.
=
@weather = mock_model(Weather)
=
but recently I saw this. so what's the :to_param and :save options
meaning?
==
@weather = mock_model(Weather, :to_param => "1", :save => true)
==
--
Posted via http://www.ruby-forum.com/.
__
On Thu, Mar 19, 2009 at 4:28 AM, jazzez ravi wrote:
> Hi All,
>
> 1. Just now I installed rspec1.2.0 and dependencies
>
> 2. Tried the 2 programs mentioned in http://rspec.info/.
>
> # bowling_spec.rb
> require 'bowling'
>
> describe Bowling do
> before(:each) do
> �...@bowling = Bowling.new
>
Hi All,
1. Just now I installed rspec1.2.0 and dependencies
2. Tried the 2 programs mentioned in http://rspec.info/.
# bowling_spec.rb
require 'bowling'
describe Bowling do
before(:each) do
@bowling = Bowling.new
end
it "should score 0 for gutter game" do
20.times { @bowling.hit(
On Wed, Mar 18, 2009 at 4:08 PM, Emmanuel Pinault wrote:
> Great! Is there section for the new hook on reporting? I used the old
> reporting to customized some of our HTML reports and wonder if you have the
> new hooks documented somewhere?
>
The public API for formatters is all the methods in
35 matches
Mail list logo