A few months ago I gave a talk on TDD/BDD for a client. I've put up
the slides, notes, and live video on my instructional site Code Like
This:
http://codelikethis.com/lessons/agile_development/test_driven
The video's in two parts -- first a lecture on TDD/BDD concepts, then
a live coding demo of
Hi, I have a question about writing scenarios in cucumber that include a
JSON.
I have the following scenario in cucumber:
Scenario Outline:
Given I send and accept JSON
And I send a POST request to with the following:
"""
{
"field1":"text",
"emails":[
{
"work"
s-boun...@rubyforge.org
[mailto:rspec-users-boun...@rubyforge.org] On Behalf Of J. B. Rainsberger
Sent: Wednesday, January 23, 2013 5:27 PM
To: rspec-users
Subject: Re: [rspec-users] Test configuration information
On Wed, Jan 23, 2013 at 2:54 PM, Jim Coble
mailto:jim.co...@duke.edu>> wrote:
One
On Wed, Jan 23, 2013 at 2:54 PM, Jim Coble wrote:
> One of my tests needs to be provided with a particular directory path.
> While I can code this path as a literal directly in the test spec, it seems
> to me it might be better to have it in a configuration file somewhere so
> that I have one pl
I think I would put it with the test. My logic is, if it breaks (needs to
change), the test will break. You will look there first to see what happened.
On Jan 23, 2013, at 12:54 PM, Jim Coble wrote:
> One of my tests needs to be provided with a particular directory path. While
> I can code t
One of my tests needs to be provided with a particular directory path. While I
can code this path as a literal directly in the test spec, it seems to me it
might be better to have it in a configuration file somewhere so that I have one
place to maintain it and look for it. Would spec_helper.rb
Chaitra,
You'll get better help on Cucumber if you use the Cucumber mailing list
rather than the rspec list. I've CC'd that list on this reply. Please
join that list and reply only there.
On 11/17/12 9:57 PM, chaitra b. wrote:
Hi,
I am new to Ruby and Cucumber. Can anyone help me with creat
Hi,
I am new to Ruby and Cucumber. Can anyone help me with creating test
scripts using cucumber for a pizza ordering site which requires a login
or new user creation to place an order.
Thanks !
--
Posted via http://www.ruby-forum.com/.
___
rspec-user
> As you can see, @seller.reload is only evaluated once, and its reputation
> score is going to be the same both times.
Aha.. Makes perfect sense. Thanks.
> Tangent: this is testing two things - @seller.reputation_score and
> Event.reputation_change_for(:mark_helpful). If either is failing to w
On Nov 23, 2011, at 3:33 PM, Patrick J. Collins wrote:
> I wrote a test that looked like this:
>
> it "increases the user's reputation" do
> lambda { @comment.update_attribute(:helpful, true) }.should
> change(@seller.reload,
> :reputation_score).by(Event.reputation_change_
I wrote a test that looked like this:
it "increases the user's reputation" do
lambda { @comment.update_attribute(:helpful, true) }.should
change(@seller.reload,
:reputation_score).by(Event.reputation_change_for(:mark_helpful))
end
And I am getting this error:
1
> But a sophisticated test will make decisions in mid test.
Quis custodiet ipsos custodes? You'll need to write specs for the
logic in your specs then.
Best,
Sidu.
http://c42.in
http://blog.sidu.in
On 10 August 2011 04:53, Mike Jr wrote:
> As I understand it, RSpec runs in two passes. The first
On Wed, Aug 10, 2011 at 2:23 AM, Mike Jr wrote:
> But a sophisticated test will make decisions in mid test. If a
> certain test condition occurs, set a singleton hash and then have
> later tests condition their processing on that hash. In my tests,
> these if statements are within the it blocks
>
> RSpec is built around the premise that each example is run in its own
> environment, and that one should not depend on the outcome of another. This
> is not unique to RSpec, btw. It's how all of the unit testing frameworks of
> which I am aware work.
>
I know I'm going off-topic, but TestNG su
On Aug 9, 2011, at 6:23 PM, Mike Jr wrote:
> As I understand it, RSpec runs in two passes. The first pass reads
> your code and invokes factory methods to generate instances of example-
> group and example subclasses. The second pass then invokes these
> generated instance to run your test.
>
>
As I understand it, RSpec runs in two passes. The first pass reads
your code and invokes factory methods to generate instances of example-
group and example subclasses. The second pass then invokes these
generated instance to run your test.
RSpec filters (via RSpec.configure) are set and operate
What do you mean that it's "leaking" into the other test? If you have
transactions turned on, then any records inserted into the db will be removed
for the next test.
My guess is that other tests just don't set up the required data...which is a
problem with ActiveRecord callbacks and observers.
Use mocks to define your interface, not to define TCPSocket directly. I would
suggest running a TCP server just to test your wrapping object.
Pat
On Mar 30, 2011, at 9:34 AM, Curtis j Schofield wrote:
> I am designing a test around a class that interacts with TCPSocket - I
> have used a mock a
I have an model in rails with an after_create that generates another
object (for the purpose of making an audit trail).
In the unit test - i want to verify this behavior.
This behaviour - in other tests is breaking some exceptions around
(include) - since the creation of the new audit trail
is le
I am designing a test around a class that interacts with TCPSocket - I
have used a mock and have asserted as minimal an interface as I can -
centered around the IO methods.
Should i be using a stub instead and stub on open and read - instead
of mock with open, read , close and so forth.
Is there
If the idea of having to say 'stubs(:method)' for every method that you're
going to call and verify, give my new mocking library Matahari a go:
https://github.com/mortice/matahari
It's brand new and deficient in many ways but I'm planning on improving it and
it sounds like we appreciate the sa
Scott, check out Bourne. It's an add on to mocha that gives you
spies. I'm using it, and like it a lot.
On Dec 2 2010, 8:53 am, David Chelimsky wrote:
> On Dec 2, 2010, at 1:44 AM, Scott Bellware wrote:
>
> > I've tried three test spy mocking frameworks for RSpec that I know of.
> > Presently,
On Dec 2, 2010, at 1:44 AM, Scott Bellware wrote:
> I've tried three test spy mocking frameworks for RSpec that I know of.
> Presently, all three (Not A Mock, RR, rspec-spies) don't work with
> RSpec 2.
Have you contacted the maintainers of the projects that offer spies? I'm a bit
surprised they
I've tried three test spy mocking frameworks for RSpec that I know of.
Presently, all three (Not A Mock, RR, rspec-spies) don't work with
RSpec 2.
Does anyone have a line on any other mocking frameworks for RSpec 2
that allow the AAA style to be supported?
I'm really hoping to not have to roll of
On Apr 12, 2010, at 2:38 PM, Michael Guterl wrote:
> On Mon, Apr 12, 2010 at 1:16 PM, David Chelimsky wrote:
>> On Apr 12, 2010, at 11:17 AM, Michael Guterl wrote:
>>
>>> I'm curious what the current state of test spies in rspec is?
>>>
>>> What is everyone using for this? not a mock? rr? rs
On Mon, Apr 12, 2010 at 1:16 PM, David Chelimsky wrote:
> On Apr 12, 2010, at 11:17 AM, Michael Guterl wrote:
>
>> I'm curious what the current state of test spies in rspec is?
>>
>> What is everyone using for this? not a mock? rr? rspec-spies?
>> I see that spies were going to be added to rspe
On Apr 12, 2010, at 11:17 AM, Michael Guterl wrote:
> I'm curious what the current state of test spies in rspec is?
>
> What is everyone using for this? not a mock? rr? rspec-spies?
> I see that spies were going to be added to rspec 1.3.0, but pulled
> because of a bug
> (https://rspec.lightho
I'm curious what the current state of test spies in rspec is?
What is everyone using for this? not a mock? rr? rspec-spies?
I see that spies were going to be added to rspec 1.3.0, but pulled
because of a bug
(https://rspec.lighthouseapp.com/projects/5645/tickets/938), will this
be brought back
> so the question is...whose fault is this? gems? rails?
I think it's rails' fault for not being careful when running
$LOAD_PATH.uniq!
...
-r
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
I think I've tracked down why rspec dislikes test-unit gems > 1.3.5
this code:
gem 'rails', '= 2.3.5'
puts $LOAD_PATH.find{|l| l.instance_variables.include?
(:@gem_prelude_index)}
puts $LOAD_PATH.uniq.find{|l| l.instance_variables.include?
(:@gem_prelude_index)}
[if you take off the '= 2.3.5' i
El 29/6/2009, a las 17:15, Wincent Colaiuta escribió:
El 29/6/2009, a las 16:26, Ben Mabey escribió:
You probably know this, but for the benefit of others... Pat made a
change a while back that makes it so the stubbed return value will
still be returned even if an expectation is added. Mea
El 29/6/2009, a las 16:26, Ben Mabey escribió:
You probably know this, but for the benefit of others... Pat made a
change a while back that makes it so the stubbed return value will
still be returned even if an expectation is added. Meaning,
assuming the stub is in the before block, you ca
Matt Wynne wrote:
On 28 Jun 2009, at 23:02, Wincent Colaiuta wrote:
El 28/6/2009, a las 23:04, Matt Wynne escribió:
On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote:
I've had one of my recurring doubts about test doubles come up again.
The full post is here but I'll abbreviate the content
El 29/6/2009, a las 9:33, Matt Wynne escribió:
On 28 Jun 2009, at 23:02, Wincent Colaiuta wrote:
El 28/6/2009, a las 23:04, Matt Wynne escribió:
On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote:
I've had one of my recurring doubts about test doubles come up
again.
The full post is here
On 28 Jun 2009, at 23:02, Wincent Colaiuta wrote:
El 28/6/2009, a las 23:04, Matt Wynne escribió:
On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote:
I've had one of my recurring doubts about test doubles come up
again.
The full post is here but I'll abbreviate the content in this
messag
El 28/6/2009, a las 23:04, Matt Wynne escribió:
On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote:
I've had one of my recurring doubts about test doubles come up again.
The full post is here but I'll abbreviate the content in this
message in any case:
https://wincent.com/blog/thinking-abou
On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote:
I've had one of my recurring doubts about test doubles come up again.
The full post is here but I'll abbreviate the content in this
message in any case:
https://wincent.com/blog/thinking-about-switching-to-rr
Basically, in one of my contr
I've had one of my recurring doubts about test doubles come up again.
The full post is here but I'll abbreviate the content in this message
in any case:
https://wincent.com/blog/thinking-about-switching-to-rr
Basically, in one of my controller specs I wanted to verify that the
following
ooh - I love this solution. The downsides that immediately come to
mind are that I'd be putting XPath expressions in my acceptance tests
which aren't necessarily readable, but since I'm the only one who has
to read them that's alright, and that I have to parse JSON into a
hash, convert the hash to
On Mon, May 11, 2009 at 5:31 PM, Bill Kocik wrote:
> On Mon, May 11, 2009 at 4:32 PM, Ben Mabey wrote:
>
>> Well.. IIRC ActiveSupport::JSON.decode will return a ruby hash of the JSON,
>> correct? So you should be able to make expectations on it just like a
>> regular hash object.
>
> You're abso
On Monday 11 May 2009, Bill Kocik wrote:
> On Mon, May 11, 2009 at 4:32 PM, Ben Mabey wrote:
> > Well.. IIRC ActiveSupport::JSON.decode will return a ruby hash of
> > the JSON, correct? So you should be able to make expectations on
> > it just like a regular hash object.
>
> You're absolutely cor
On Mon, May 11, 2009 at 4:32 PM, Ben Mabey wrote:
> Well.. IIRC ActiveSupport::JSON.decode will return a ruby hash of the JSON,
> correct? So you should be able to make expectations on it just like a
> regular hash object.
You're absolutely correct - I think I did a poor job of asking my
questi
Bill Kocik wrote:
Hi Folks -
I'm hoping someone has come before me in trying to do this. I want to
use Cucumber to acceptance-test my JSON output. So far all I can do is
validate that the JSON is valid, with this step:
Then /^I should get valid JSON$/ do
assert_nothing_raised do
ActiveSup
Hi Folks -
I'm hoping someone has come before me in trying to do this. I want to
use Cucumber to acceptance-test my JSON output. So far all I can do is
validate that the JSON is valid, with this step:
Then /^I should get valid JSON$/ do
assert_nothing_raised do
ActiveSupport::JSON.decode(@r
Pat Maddox wrote:
>>
>> Scenario: Application has known users
>> Given that the application has users
>> When the user signs on
>> Then the user is authenticated
>
> WTBV?
>
> (Where's the business value (I totally made that up, but I'm gonna stick
> with it :))
I like it too. That said, r
James Byrne writes:
> Matt Wynne wrote:
>> On 9 Dec 2008, at 19:06, James Byrne wrote:
>>
>>> should
>>>
>>> When /authentication by authlogic/ do
>>> #TODO: Find out how to test for a loaded gem within an application
>>> end
>>
>> If you're working at the level of Cucumber features, I would s
Ashley Moran wrote:
>
> Then you already have the name to verify if you want to display a
> personalised message. (On the other hand, putting too much data in
> the steps gets cumbersome; I tend to write them more like this:
>
>Scenario: A known user signs in successfully
> Given I am
On 10 Dec 2008, at 17:40, James Byrne wrote:
So, if I understand you correctly, then I should write features
somewhat
like this:
Scenario: A known user signs in successfully
Given a known user "myuser" with a password "myuserpassword"
When user "myuser" signs on with a password "myuserpass
I put a starter application with a bunch of features to test authorisation
code implemented by Restful Authentication on Github a few days ago. In
theory you could apply these features directly to your Authlogic
implementation.
http://github.com/diabolo/fbrp/tree/master
All best
Andrew
2008/12/
Ashley Moran wrote:
>
> Don't confuse library code with code you write to use this library.
> The AuthLogic config in your app is code too, and it adds behaviours
> to your app. The fact there are 10, 100 or 10,000 lines of code
> behind it is irrelevant.
So, if I understand you correctly, then
On 10 Dec 2008, at 16:26, James Byrne wrote:
James Byrne wrote:
Of course, the last example should have been:
When /user is authenticated/ do
# We use Authlogic for authentication so just test that gem is loaded
assert defined?("Authlogic")
end
To verify that the user has been authenticate
On 10 Dec 2008, at 16:04, James Byrne wrote:
Nonetheless, in the step definitions I must test the behaviour in a
fashion which first drives and then confirms the implementation
details.
This is not the path to BDD, it's the path to state-based testing.
Matt has already explained this wel
James Byrne wrote:
Of course, the last example should have been:
When /user is authenticated/ do
# We use Authlogic for authentication so just test that gem is loaded
assert defined?("Authlogic")
end
--
Posted via http://www.ruby-forum.com/.
___
rs
Matt Wynne wrote:
> On 9 Dec 2008, at 19:06, James Byrne wrote:
>
>> should
>>
>> When /authentication by authlogic/ do
>> #TODO: Find out how to test for a loaded gem within an application
>> end
>
> If you're working at the level of Cucumber features, I would stay well
> away from implementati
On 9 Dec 2008, at 19:06, James Byrne wrote:
I have decided that for now I am going to use the authlogic gem to
provide authentication for the project I am creating. The question
arises, since authentication is a user feature request and since it is
to be satisfied through the use of a gem (not
I have decided that for now I am going to use the authlogic gem to
provide authentication for the project I am creating. The question
arises, since authentication is a user feature request and since it is
to be satisfied through the use of a gem (not a plugin) then should one
test for the availabi
On 24 Nov 2008, at 17:56, James Byrne wrote:
Matt Wynne wrote:
Make sense?
Matt
Yes. I am afraid that my original post is based upon a naive sense of
how things work in this environment. Clearly, whenever one is dealing
with human input then the possibility of incomplete, contradictory,
Matt Wynne wrote:
>
> Make sense?
> Matt
Yes. I am afraid that my original post is based upon a naive sense of
how things work in this environment. Clearly, whenever one is dealing
with human input then the possibility of incomplete, contradictory, or
simply wrong data must be accommodated
On Sun, Nov 23, 2008 at 10:51 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>
> def create
> @user = User.create! params[:user]
> rescue ActiveRecord::RecordInvalid
> # this won't work, because @user never gets assigned, since
> create! raised an exception
> render :action => "new"
>
On 21 Nov 2008, at 14:44, James Byrne wrote:
David Chelimsky wrote:
Without seeing the controller code, I'd guess that the controller
uses
create, and not create! and that a validation failure is not getting
reported anywhere.
If so, try changing create to create! and you should get your
Bah, hit send on accident... here's the last create! example...
def create
@user = User.create! params[:user]
rescue ActiveRecord::RecordInvalid
# this won't work, because @user never gets assigned, since
create! raised an exception
render :action => "new"
end
In any of the
On Fri, Nov 21, 2008 at 9:44 AM, James Byrne <[EMAIL PROTECTED]> wrote:
> David Chelimsky wrote:
>
>>
>> Without seeing the controller code, I'd guess that the controller uses
>> create, and not create! and that a validation failure is not getting
>> reported anywhere.
>>
>> If so, try changing cre
David Chelimsky wrote:
>
> Without seeing the controller code, I'd guess that the controller uses
> create, and not create! and that a validation failure is not getting
> reported anywhere.
>
> If so, try changing create to create! and you should get your error.
>
Thank you. You were close eno
On Thu, Nov 20, 2008 at 1:30 PM, James Byrne <[EMAIL PROTECTED]> wrote:
> Not an RSpec question, but I was led to this problem by starting to use
> autotest with cucumber and so, however unjustly, I feel that RSpec has
> to shoulder some of the blame.
>
> I have a failing test in my clients_control
Not an RSpec question, but I was led to this problem by starting to use
autotest with cucumber and so, however unjustly, I feel that RSpec has
to shoulder some of the blame.
I have a failing test in my clients_controller test and I cannot figure
out what is wrong from the information provided from
"Zach Dennis" <[EMAIL PROTECTED]> writes:
> On Sat, Oct 18, 2008 at 11:34 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
>> On 2008-10-18, at 09:16, Pat Maddox wrote:
>>>
>>> Scott Taylor <[EMAIL PROTECTED]> writes:
You'd be able to write a spec like the following:
it "should link
On Oct 18, 2008, at 10:50 am, Scott Taylor wrote:
No - that's not really an option. The rails stack has no idea about
a DOM.
One option, though, is to stub methods and use message
expectations. For instance, if you had a helper like the following:
Hi Scott
Another option would be Hpr
On Oct 18, 2008, at 9:16 AM, Pat Maddox wrote:
Scott Taylor <[EMAIL PROTECTED]> writes:
On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec
test to valid
On Sat, Oct 18, 2008 at 11:34 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-10-18, at 09:16, Pat Maddox wrote:
>>
>> Scott Taylor <[EMAIL PROTECTED]> writes:
>>>
>>> You'd be able to write a spec like the following:
>>>
>>> it "should link with the correct name" do
>>> helper.should_receiv
On Sat, Oct 18, 2008 at 6:16 AM, Pat Maddox <[EMAIL PROTECTED]> wrote:
> Does have_tag work with plain strings
>
Yep, it does. That's how I spec #to_amcharts. :)
///ark
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailma
On 2008-10-18, at 09:16, Pat Maddox wrote:
Scott Taylor <[EMAIL PROTECTED]> writes:
You'd be able to write a spec like the following:
it "should link with the correct name" do
helper.should_receive(:link_to).with("foo", {:controller => "foo",
:action => "foo"})
helper.my_method("foo")
end
Scott Taylor <[EMAIL PROTECTED]> writes:
> On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
>
>> Hi
>>
>> I'm using RSpec in with Ruby on Rails. I've made a helper module
>> method that generates some HTML and would like to create a rspec
>> test to validate this HTML. I can of cause use re
On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec
test to validate this HTML. I can of cause use regex to validate it
as a string, but would much rat
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec test
to validate this HTML. I can of cause use regex to validate it as a
string, but would much rather validate it by traversing the DOM and
checking that t
Green!
On Fri, Jun 13, 2008 at 10:44 AM, Chuck Remes <[EMAIL PROTECTED]> wrote:
> Verify I can successfully send to the list.
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_
Verify I can successfully send to the list.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Jonathan Linowes wrote:
Is there an easy way to inject each example text into test.log so I
can isolate the log output per example?
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
You could cr
Is there an easy way to inject each example text into test.log so I
can isolate the log output per example?
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
> Yeah but then I get to say RTFM. Right now, TFM doesn't exist :(
rant << EOF
Indeed. People see much trouble in writing documentation so that they
don't have to answer the same questions ad nauseam.
It would be nice if we appreciated their efforts and check the
documentation first.
EOF
--
"
On Tue, Feb 26, 2008 at 8:31 AM, Max Williams
<[EMAIL PROTECTED]> wrote:
> hehe, tbh even if the documentation had been there i probably wouldn't have
> read it :)
Yeah but then I get to say RTFM. Right now, TFM doesn't exist :(
>
> thanks!
>
>
>
> On 26/02/2008, David Chelimsky <[EMAIL PROTECTED
hehe, tbh even if the documentation had been there i probably wouldn't have
read it :)
thanks!
On 26/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On Tue, Feb 26, 2008 at 8:08 AM, Max Williams
>
> <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > On 26/02/2008, David Chelimsky <[EMAIL PROTECTE
On Tue, Feb 26, 2008 at 8:08 AM, Max Williams
<[EMAIL PROTECTED]> wrote:
>
>
>
> On 26/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, Feb 26, 2008 at 7:39 AM, Max Williams
> > <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > This does not happen for you implicitly when you use before
On 26/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On Tue, Feb 26, 2008 at 7:39 AM, Max Williams
> <[EMAIL PROTECTED]> wrote:
>
>
> This does not happen for you implicitly when you use before(:all)
> because there is no mechanism for running a group of examples in a
> transaction.
ah..
On Tue, Feb 26, 2008 at 7:39 AM, Max Williams
<[EMAIL PROTECTED]> wrote:
> I'm using before(:all) because i want to create a single 'family' of tree
> objects and then run tests against it. If i have all the object creation as
> a before(:each) then the database will be even more full of duplicati
I'm using before(:all) because i want to create a single 'family' of tree
objects and then run tests against it. If i have all the object creation as
a before(:each) then the database will be even more full of duplications,
won't it?
My problem, though, is that the data is left over from the last
On Tue, Feb 26, 2008 at 5:41 AM, Edvard Majakari <[EMAIL PROTECTED]> wrote:
> > My problems seem to be arising from the fact that when i run the test, the
> > objects i created last time are still in the database. Shouldn't they be
> > cleared out automatically? This in turn is preventing me fr
> My problems seem to be arising from the fact that when i run the test, the
> objects i created last time are still in the database. Shouldn't they be
> cleared out automatically? This in turn is preventing me from saving root
I don't know RSpec that well, but I'd guess before(:all) is run only
Hi all
I'm having problems with data in my specs - i'm probably just going about
things the wrong way though.
I'm testing a model (called Property) that uses acts_as_tree, and for now
have just done some specs for the basic acts_as_tree functionality - just as
a sanity check, i thought, but i'm g
Now implement and refractor and you're correctly doing BDD.
On 16/02/2008, at 12:11 AM, [EMAIL PROTECTED] wrote:
> test
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
___
On Fri, Feb 15, 2008 at 10:27 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> D'oh! Let's try that again.
>
> behave
Austin "Chelimsky" Powers ?!
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
___
rspec-users mailing list
rspe
D'oh! Let's try that again.
behave
On Fri, Feb 15, 2008 at 10:25 AM, Mike Vincent <[EMAIL PROTECTED]> wrote:
> On Fri, Feb 15, 2008 at 9:11 AM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > test
>
> 1 tests, 0 assertions, 0 failures, 0 errors
>
>
>
On Fri, Feb 15, 2008 at 9:11 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> test
1 tests, 0 assertions, 0 failures, 0 errors
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
test
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On 11/14/07, Karni Karni <[EMAIL PROTECTED]> wrote:
> Karni Karni wrote:
> > aslak hellesoy wrote:
> >
> > Could u pls give any URL form u written this code?
>
> Thanks for ur reply. But in my case the total code is in the controller.
It shouldn't be. Put business logic in the model.
http://weblo
Karni Karni wrote:
> aslak hellesoy wrote:
>
> Could u pls give any URL form u written this code?
Thanks for ur reply. But in my case the total code is in the controller.
I' submitting the from to a specific action with CSV file.
Hoew can I pass my CSV file to that specific action
--
Posted vi
aslak hellesoy wrote:
Could u pls give any URL form u written this code?
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
look at the RDoc for should change...
describe Task do
fixtures :tasks # should put 2 tasks in the database
it "should not import twice from CSV" do
csv = File.dirname(__FILE__) + '/sample.csv' # It should have 4 new tasks
lambda do
Task.import_from_csv(csv)
end.should chang
aslak hellesoy wrote:
> On Nov 12, 2007 11:36 AM, KarniRevuri <[EMAIL PROTECTED]> wrote:
>> typical windows file open controls."
>>
>>
>> Please give me any ideas
>>
>
> Is this related to the post that you replied to?
> Your question is too vague. Can you be more specific about what you
> need he
On Nov 12, 2007 11:36 AM, KarniRevuri <[EMAIL PROTECTED]> wrote:
>
> I want to write below specs
>
> specify "The system allows users to import a pre-formatted CSV file into
> project."
> specify "Each row in the spreadsheet is imported as one new Task."
> specify "The import WILL NOT update ex
I want to write below specs
specify "The system allows users to import a pre-formatted CSV file into
project."
specify "Each row in the spreadsheet is imported as one new Task."
specify "The import WILL NOT update existing tasks."
specify "If the import file has any records that fail due t
1 - 100 of 118 matches
Mail list logo