2009/9/25 Mithun Perera
> Mithun Perera wrote:
> > Mithun Perera wrote:
> >> Hi all,
> >> I am an university student and these days i am on training period. So i
> >> want to know about ruby on on rails "cucumber and Rspec". If somebody
> >> know about these fields please help me. If not please s
2009/10/7 aslak hellesoy
>
>
> On Wed, Oct 7, 2009 at 10:24 PM, Andrew Premdas wrote:
>
>> 2009/9/25 Mithun Perera
>>
>>> Mithun Perera wrote:
>>> > Mithun Perera wrote:
>>> >> Hi all,
>>> >> I am an university student
2009/10/7 David Chelimsky
> On Wed, Oct 7, 2009 at 3:57 PM, aslak hellesoy
> wrote:
> >
> >
> > On Wed, Oct 7, 2009 at 10:24 PM, Andrew Premdas
> wrote:
> >>
> >> 2009/9/25 Mithun Perera
> >>>
> >>> Mithun Perera wrote:
>
2009/10/14 Joaquin Rivera Padron
> hello there,
> how do you tipically spec private methods? The thing is Ï have something
> like this:
>
> def some_method
>complex_method + other_complex_methods
> end
>
> private
> def complex_method...
> def other_complex_methods ...
>
> and the two complex
2009/10/15 Stephen Eley
> On Thu, Oct 15, 2009 at 3:59 AM, Andrew Premdas
> wrote:
> >
> > You can take this further and state that no public method should ever do
> > anything, it should just contain calls to private methods which document
> how
> > the public
2009/10/28 Rails ROR
> Hi All,
>
> I want to test my application with rspec.
>
> In order to test my views, I have written few specs as given in the
> examples.
>
> Is there any way to test the user acceptance?
>
> i.e suppose the field takes a string.
>
> I want to test it for integers, float va
2009/10/29 nruth
> Hi Guys
>
> I'm going to put the cat amongst the pigeons here in the hope of some
> clarity falling out of the sky on me.
> My question is this: In a world with Cucumber what is the value of
> view specs?
>
> In the community (railscamp, for example) there are a fair number of
2009/11/4 Stephen Eley
> On Wed, Nov 4, 2009 at 10:56 AM, Andrew Premdas
> wrote:
> >
> > Putting lots of
> > view details in the features (and I should see a wibble field etc. ...)
> > pollutes this map with clutter that is not relevant to the "business"
2009/11/5 Chuck van der Linden
> On Nov 4, 5:30 pm, David Chelimsky wrote:
> > On Wed, Nov 4, 2009 at 3:36 PM, Stephen Eley wrote:
> > > On Wed, Nov 4, 2009 at 3:24 PM, Andrew Premdas
> wrote:
> >
> > > > Personally I now think nested steps are evil - bu
Hi all,
I have a rails application whose specs run on about eight different boxes,
but I can't get them to work on my integration server. The bit thats
breaking concerns some modules that I have in spec/support/modules which are
loaded by
the following line in spec_helper
# get any macros etc
2009/11/27 Ben Mabey
> Andrew Premdas wrote:
>
>> Hi all,
>>
>> I have a rails application whose specs run on about eight different boxes,
>> but I can't get them to work on my integration server. The bit thats
>> breaking concerns some modules that
2009/12/4 Andy Koch
> Hi All,
>
> any reason why some tests might pass via spec ... and fail from within
> autospec?
>
> I have a rails app using AuthLogic and Declarative Authorization. I
> have tests that create user_sessions and assign roles against which
> CRUD rules are tested.
>
> This has
2009/12/14 Amit Kulkarni
> Thanks David.
> Also i am little bit confused regarding routes.
>
> Consider a routing example
>
> it "should map { :controller => 'channels', :action => 'new' } to
> /channels/new" do
> route_for(:controller => "channels", :action => "new").should ==
> "/channels/new"
2009/12/22 Rick DeNatale
> On Tue, Dec 22, 2009 at 10:24 AM, David Chelimsky
> wrote:
> >
> >
> > On Tue, Dec 22, 2009 at 9:22 AM, David Chelimsky
> > wrote:
> >>
> >>
> >> On Tue, Dec 22, 2009 at 9:14 AM, Peter Fitzgibbons
> >> wrote:
> >>>
> >>> Hello Folks,
> >>>
> >>> This gist http://gist
2009/12/30 rogerdpack
> > What about something like:
> >
> > expected # => Fixnum to be a kind of Fixnum
> >
> > That is more aligned with other failure messages. WDYT?
>
> I quite like it.
> In this instance it was
>
> 3.class.should be_a Fixnum # fails
>
> I suppose it would be something like
2010/1/3 rogerdpack
> > > The very first test I thought up was "this method should return an
> > > integer" so kind of a basic test for a not yet existent method.
> >
> > Isn't this a bit anti-ruby though. Surely the things we should be testing
> is
> > that the object exists, responds to certain
2010/1/2 David Chelimsky
>
>
> On Sat, Jan 2, 2010 at 3:23 PM, Andrew Premdas wrote:
>
>> 2009/12/30 rogerdpack
>>
>> > What about something like:
>>> >
>>> > expected # => Fixnum to be a kind of Fixnum
>>> >
>>&g
2009/12/30 Paul Hinze
> Given this simple cucumber feature (related to another rspec bug I am
> working on):
>
> http://gist.github.com/266335
>
> I'm fighting with this error messages that _only_ shows up in certain
> situations that I can't quite pin down (rake features breaks, individual
> cu
2010/1/4 David Chelimsky
> On Mon, Jan 4, 2010 at 2:57 PM, Andrew Premdas wrote:
>
>> 2009/12/30 Paul Hinze
>>
>> Given this simple cucumber feature (related to another rspec bug I am
>>> working on):
>>>
>>> http://gist.github.com/266335
2010/1/7 Phillip Koebbe
>
>
> Wincent Colaiuta wrote:
>
>>
>> Well, there is more than one way to skin a cat, but the thing I like about
>> my proposed solution is that:
>>
>> - the specification of the behavior appears in the "describe" block that
>> corresponds to the controller where the behav
On 31 January 2010 22:02, Nick Hoffman wrote:
> One of my controller actions sends a redirect if the request URI begins
> with /foods/search
>
> 34 def search
> 35return redirect_to "/#{params[:name]}" if
> request.request_uri.match /^\/foods\/search/
>
> Unfortunately, I can't figure out
On 19 February 2010 08:59, Erik Pukinskis wrote:
> Hello Specmeisters!
>
> I have a bit of a philosophical question for the TDD witches and
> wizards out there. I'm working on some code that is really
> churning... It's doing complicated calculations, but the actual
> desired results are a movin
On 4 February 2010 05:12, David Mitchell wrote:
> Hello group,
>
> I've searched through several months messages in the archive, but haven't
> found an answer to this...
>
> What is the 'best practice' way to structure RSpec code and documentation
> when testing a very large project, where the RS
Hi List,
Being pretty lazy here, but I figure you can help very quickly and others
might benefit from the results. I write old crumbly rspec (see gist
http://gist.github.com/411689), and I would like to improve, can you take my
crumbly spec and make it shiny?
Also if you can post any links to rec
On 25 May 2010 18:50, Pito Salas wrote:
> Meta question: is this the right/best place to ask for assistance with
> Cucumber or am I in the wrong place?
>
> Anyway, here goes. I just started using cucumber and it's very
> impressive!
>
> Check out this fragment:
>
> And I go to the home page
> The
Link doesn't work typo?
On 10 June 2010 10:43, Julian Leviston wrote:
> I'm not so sure "We all know good principles of OOP" actually.
>
> I'd recommend www.vpri.com.au and looking into the work of Alan Kay. A lot
> of his stuff can be found for free online, because it's decades old.
>
> Julian
Hi there.
My understanding (which is limited) is that rspec uses at_exit to run its
specs. I don't really know why - could somoene explain?
My problem with this behaviour is that I would like the running of a spec to
start an instance of solr (using Sunspot) if one is not running. The problem
wit
On 8 July 2010 01:01, David Chelimsky wrote:
> On Jul 7, 2010, at 8:22 AM, Andrew Premdas wrote:
>
> > Hi there.
> >
> > My understanding (which is limited) is that rspec uses at_exit to run its
> specs. I don't really know why - could somoene explain?
>
&
On 8 July 2010 11:46, David Chelimsky wrote:
> On Jul 8, 2010, at 4:24 AM, Andrew Premdas wrote:
>
> On 8 July 2010 01:01, David Chelimsky wrote:
>
>> On Jul 7, 2010, at 8:22 AM, Andrew Premdas wrote:
>>
>> > Hi there.
>> >
>> > My understandi
trying out new syntax from jon larkowski's rspec presentation. Following
doesn't work in that when I run the line from the command prompt or from
textmate no specs are run
context "cancel" do
subject do
order = at_dropshipping
order.cancel_dropship!
order
end
its(:
On 21 July 2010 17:06, David Chelimsky wrote:
> On Jul 21, 2010, at 10:09 AM, Andrew Premdas wrote:
>
> > trying out new syntax from jon larkowski's rspec presentation. Following
> doesn't work in that when I run the line from the command prompt or from
&g
Set an expectation that do_something should be called once. Then create a
new Foo.
With the method chain set an expectation that your chained method should be
called, then call the original method. You should be able to check that the
original method is passed as a param.
Further information in R
On 30 October 2010 14:40, Andrew Wagner wrote:
> Ok, so here's the scenario. I have a top-level module, with a method called
> load_file. It should take a file name, get the YAML module (Syck) to parse
> it, and then send the result to a class, which should convert that result
> into a series of
When doing BDD, especially at the start, I found it really easy to write
more code than you need to, when implementing a particular functional spec.
I also found it really easy to miss the point where you should move into the
inner cycle (unit cycle). Using the unit test coverage metric to make su
Rob,
This doesn't make sense
1. None of your examples here are using have_selector !
2. Why is OrderMailer no longer creating a receipt
3. Why is @mailer being encoded
Is mailer.body the same in both versions, can you show this.
Have you tried using a debugger before the first have_tag line.
A
for Jamis Buck's fat model skinny controller blog post, make your
controllers do as little as possible and put all logic in the model. Then
use rspec to test the public methods in your model. This will give you a
much shallower learning curve, and be much more productive
rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
Whilst its very noble to try and follow the ruby gems document to the
letter, some consideration has to be given to the overall effect of rapidly
changing major version numbers on the project. RSpec has a very large user
base, a close tie in with Rails major versions, in particular the idea to
Rails 3 should use RSpec 2, and a history of changing major versions very
infrequently with major consequences to the vast majority of users. This I
think is a fair assessment of RSpec's context re version numbers. To move to
RSpec 3, for such a small change would be completely out of character for
the project. To end up in 4 months time with RSpec 9 would be very
detrimental to the projects reputation.
So I think the pragmatic approach is a minor release with a big caveat in
the history and a big announcement on the mailing list
All best
Andrew
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
all require. In the code above, you're pushing the lib directory onto the
> load path.
>
> > The require statement I ended up using is
> >
> > require 'codebreaker/game'
>
> Maybe the lib/codebreaker file was supposed to do that?
>
> It should, mine
controllers in the namespace inherit from it. Something like:
>
> https://gist.github.com/784363
>
> Doing it this way does create seeming duplication in the views, but
> partials can be used very easily to deal with that. This method also
> more or less demands a menu structure that completely separates the
> functionality of each role, but in the projects that I've been working
> on, that has been a benefit. To have all of the role-based
> functionality separated in controllers and menus has provided clear
> lines that are easy to follow. In short, it has worked out really
> well. But, as always, your own mileage may vary.
>
> Peace.
> Phillip
>
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
+1 for the many controllers for one model pattern, you can really simplify
controllers with this approach. Having a separate view hierarchy for each of
these controllers also makes for simpler views, with less logic. However you
have be very disciplined with your view partials, or the number of files can
get a bit confusing
All best
Andrew
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
]On 22 January 2011 09:47, David Chelimsky wrote:
> On Fri, Jan 21, 2011 at 5:13 PM, Andrew Premdas
> wrote:
> > On 21 January 2011 13:56, David Chelimsky wrote:
> >>
> >> On Jan 19, 2011, at 6:48 AM, Rick DeNatale wrote:
> >>
> >> > On Tue, J
o with mysql not resetting its numbering between
tests, so it is actually loading a user, but not with ID=1. I'm pretty sure
I've seen that behaviour in the past.
All best
Andrew
___
> rspec-users mailing list
> rspec
s) behaviour.
The best place to see how they work in tandem is the RSpec Book.
All best
Andrew
___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
---
follow that do you
get the same error? If so can you gist the following
rvm --version
ruby --version
gem list --local
Perhaps you need to update rvm, or revert it back?
HTH
Andrew
___________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
(0 bytes
> 0.09s)
> => # @http_response=#>
> ruby-1.9.2-p180 :002 > response.body
> => nil
>
> Interestingly, that same uri does actually have a body when invoked with a
> get.
>
> Best,
> Sidu.
> http://c42.in
> http://about.me/ponnappa
>
>
still getting errors, although it could be
something unrelated
TIA
Andrew
--
--------
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On 3 June 2011 15:17, David Chelimsky wrote:
> On Jun 3, 2011, at 7:39 AM, Andrew Premdas wrote:
>
> > Hi there,
> >
> > I need some help migrating some code in the cucumber textmate bundle so I
> can run the specs with rspec2.
> >
> > The following code l
th spec_helper
3. No explanation of where files should be put (in spec folder?)
4. I think the fixtures section could be fleshed out a bit with an example
HTH
Andrew
> ___________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-use
Hi there, latest rspec2, running in debug mode, does not seem to pick up
settings from project .rdebugrc or home ~/.rdebugrc. Wondering if others
experience this and if its anything obvious
TIA
Andrew
--
Andrew Premdas
blog.andrew.premdas.org
ervable behavior of a model without
> mocking its internals. This is _not_ the same as setting expectations on
> model methods called from controllers, in which case we're specifying how
> one component (the controller) talks to another component (the
--profile is not a formatter (its not a
formatter in
I'm using Jenkins for Ci and rspec2, on a rails app
TIA
Andrew
--
--------
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rub
roblem, but it does not tell you what
the problem is.
Using multiple metrics and viewing them over time will give you many
indicators of possible problems with a project. Properly identifying
a problem, with enough precision to have a chance of implementing solutions
for it, requires the investigation
t; ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
If you are using Cucumber (which is in your minimal set of Gems), you don't
need to write this sort of test. A Cucumber fea
faster-start-up-time/
> --
> John Feminella
> Principal Consultant, BitsBuilder
> LI: http://www.linkedin.com/in/johnxf
> SO: http://stackoverflow.com/users/75170/
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> htt
ted in how that
cleanup is implemented. If you want to specify how the cleanup works
then make cleanup public - either in this class, or perhaps better yet
in another class. e.g.
describe "Cleanup.clean"
it "should delete files"
end
...
end
describe IconGenerator
r.run(:set_load_path)
end
end
HTH
All best
Andrew
>
> cheers,
> Matt
>
> --
> Freelance programmer & coach
> Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy)
> Founder, http://relishapp.com
> +44(0)7974430184 | http://twitter.com/mattwynne
>
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ng a new rails project with the
same gemset (ideally using RVM) might help isolate the issue. Also
publishing the error messages in a gist, or even publishing the whole
project on Github might help.
All best
Andrew
> thanks
> jc
>
> On 21 Okt., 22:18, Lenny Marks wrote:
>> On
27;database_cleaner'
> end
>
> removing the :require => ... lines seemed to fix the problem
>
> So you were right - it was all my fault ;)
>
> thanks for prodding me in the right direction.
>
> cheers
> jc
your welcome
all best
Andrew
>
t extracting
domain objects (or something like that).
HTH
Andrew
ps
>
> [1] http://jstorimer.github.com/spin/
>
> --
> http://www.patchspace.co.uk/
> http://www.linkedin.com/in/ashmoran
>
> ___
> rspec-users mailing list
> rspec-u
On 23 November 2011 00:57, Justin Ko wrote:
>
> On Nov 22, 2011, at 4:52 PM, Andrew Premdas wrote:
>
>> On 22 November 2011 20:31, Ash Moran wrote:
>>> Hi
>>>
>>> I've worked on a couple of Rails 3 apps recently and the test feedback loop
>>&
On 23 November 2011 10:54, Ash Moran wrote:
>
> On 23 Nov 2011, at 07:19, Andrew Premdas wrote:
>
>>>> Use Ruby 1.8.7 its much faster. There is a very good screencast on
>>>> Destroy All Software that might help also - the one about extracting
>>&g
altech.edu
> ___________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ers@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
I'm a moderator on the Cukes list. There are no outstanding messages
awaiting moderation. I suggest you try again. Send your message to
cu...@googlegroups.com
All best
Andrew
--
And
ther
account?
All best
Andrew
> --
> Posted via http://www.ruby-forum.com/.
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
--
--------
Andrew P
_______
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
> app root:
>
> rpsec spec
>
> (Sorry to any bothered readers for any undue brevity in the previous
> post-response cycle, but I've assumed that the type of error
> (RoutingError) in combination with the way rspec works and fails for
> my functional tests was adequate to suggest a fix.)
>
> Thanks,
>
> Lille
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
Just a wild guess here, but shouldn't the folder match the namespace, you
have a beta folder and a Beta1 namespace
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
very
easy to implement in cucumber e.g - after all you just need to visit a url
to generate the request. The only issue is that in Rails you may not get
the error page you expect because you are running in test mode. You can
address that by using an @allow-rescue tag on the feature.
HT
hould ... #{bad_attr}..." do
fill_in(good_attrs(:except => {:bad_attr})
etc.
All of top of my head so expect syntax errors, but hopefully enough to be
useful
All best
Andrew
HTH
Andrew
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
n to do it correctly. As a
hack Capybara's all method in practice will return the paragraphs in order
(but this isn't guaranteed by specification).
HTH
Andrew
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
see below
On 2 March 2012 03:33, S Ahmed wrote:
> I am not sure why my form submission is failing (request test).
>
> I am calling:
>
> # form is filled in a 'before do' block.
>
> it "should create an account" do
> expect { click_button "Create" }.to change(Account, :count).by(1)
>
put a deb
T23:59:59+00:00
> * 2012-03-10T00:00:00+00:00, 2012-03-16T23:59:59+00:00
> * 2012-03-17T00:00:00+00:00, 2012-03-23T23:59:59+00:00
>
>
> thanks
>
> --
> Posted via http://www.ruby-forum.com/.
> ___
> rspec-users mailing li
e),
...
Finally an important lesson is that your tests being green is really not
that important. Its much more important that tests
1. say what they do
2. are listened to, so they exert a positive influence on your design
3. make things easy to fix when they go red
All best
Andrew
___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Hi there,
Is there any particular reason why stub is not stub.as_null_object by
default?
Or alternatively is there some nicer sugar for stub.as_null_object
Is RSpec trying to discourage the use of stub.as_null_object, and if so why?
TIA
Andrew
--
Andrew Premdas
Hi all,
Having not done any speccing for a few weeks I just spent ages puzzling
over why the following code wasn't working
it "should require a client" do
expect{ }.should raise_error ArgumentError
end
and giving me a
expected ArgumentError, got #__
rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Andrew Premdas
blog.andrew.premdas.org
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On 16 May 2013, at 04:22, "Andrey S." wrote:
> Yes, I know, that testing private methods it's not a good idea (and I
> read this thread - http://www.ruby-forum.com/topic/197346 - and some
> others)
>
> But how can I test the following code?
> I use xmpp4r. In my public method #listen I start rece
d="kid_#{kid.id}"}
=link_to 'Destroy' ...
Your test is telling you your markup sux (thats why its so difficult to
test). So instead of making the test do something really difficult, listen
to your test and improve your code.
> --
> Posted via http://www.ruby-foru
Assuming you have a multi-step wizard like thing, with lots of different
states and paths through it. What approach would your use to write a feature
for it? What I want to do is do the separate states and then reuse these
things in more complex scenarios that cover paths. For example
Scenario: Sta
sy
to represent or formulate.
I can see that wanting this construct, could indicate a smell maybe a badly
worded story - i.e. a conjunction step.
All best
Andrew
2008/11/4 Ashley Moran <[EMAIL PROTECTED]>
>
> On 4 Nov 2008, at 12:45, Andrew Premdas wrote:
>
> General case I
smaller steps.
However we only have 'And' available in stories, do we need 'Or'?
All best
Andrew
2008/11/4 Pat Maddox <[EMAIL PROTECTED]>
> "Andrew Premdas" <[EMAIL PROTECTED]> writes:
>
> > General case I'm thinking about is just testing tha
Thanks Matt, just what I was looking for :)
Andrew
2008/11/4 Matt Wynne <[EMAIL PROTECTED]>
> On 4 Nov 2008, at 15:41, Andrew Premdas wrote:
>
> Assuming you have a multi-step wizard like thing, with lots of different
>> states and paths through it. What approach woul
Oh I was definitely into theoretical speculation here :) - haven't got a
particular case at the moment
2008/11/4 Zach Dennis <[EMAIL PROTECTED]>
> On Tue, Nov 4, 2008 at 11:36 AM, Andrew Premdas <[EMAIL PROTECTED]>
> wrote:
> > Ok I see. I was approaching this
e lots of times when having this sort of syntax would be useful.
All best
Andrew
2008/11/4 Ashley Moran <[EMAIL PROTECTED]>
>
> On 4 Nov 2008, at 11:26, Andrew Premdas wrote:
>
> Any ideas about the general case, is making a custom matcher the (only)
>> way to go?
Is there any way to do
foo.should (be_nil || be_empty)
in rspec.
Thanks in advance
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Sweet I'm using rails so will give it a go. Any ideas about the general
case, is making a custom matcher the (only) way to go?
All best
Andrew
2008/11/4 Tom Stuart <[EMAIL PROTECTED]>
> On 4 Nov 2008, at 11:10, Andrew Premdas wrote:
>
>> Is there any way to do
>> f
What you are suggesting here changing your api to make it easier to refactor
your api. Your trying to do this by
1) Generalising the descriptivness of the api
2) Reducing the number of calls to your api
Both of these are not particularly good ideas
1) Generalising your api, reduces it descriptiv
l api that is clear and simple and
consequently easier to refactor when the need arises
2008/11/5 David Chelimsky <[EMAIL PROTECTED]>
> On Wed, Nov 5, 2008 at 9:12 AM, Andrew Premdas <[EMAIL PROTECTED]> wrote:
> > What you are suggesting here changing your api to make it ea
I'm working on writing features for a wizard. The wizard collects
information from a number of different forms, and you can navigate through
it in a number of ways. Anyhow one of these forms is a customer form
collecting name, and email.
In the context of the wizard I feel that the following scena
ow level (dare I say unit) features, which have the benefit of clearly
documenting intention in a way that any other test mechanism I've seen so
far cannot.
The brain dump is much appreciated and helps
Cheers
Andrew
2008/11/7 Joseph Wilk <[EMAIL PROTECTED]>
> Andrew Premdas wrote:
>
early. If something is in the right place is
much easier to find out what it is trying to do. Maybe there is a need
for a feature hierarchy in the same way there is a test heirarchy ...
All best
Andrew
2008/11/7 Matt Wynne <[EMAIL PROTECTED]>:
> On 7 Nov 2008, at 06:09, Andrew Premdas wrot
You could try the bundle in the E editor on windows http://www.e-texteditor.com/
2008/11/7 aidy lewis <[EMAIL PROTECTED]>:
> Hi Matt,
>
> How are you?
>
> On 07/11/2008, Matt Wynne <[EMAIL PROTECTED]> wrote:
>> Are you pairing with them? Can you not just drive and do the typing, asking
>> them que
+1 for abstract and concrete as it gives an indication of what the
story should contain i.e.
I should get an error
vs
I should be told my email must have an @ sign and be ...
Andrew
2008/11/7 David Chelimsky <[EMAIL PROTECTED]>:
> On Fri, Nov 7, 2008 at 9:58 AM, David Chelimsky <[EMAIL PROTE
A couple of tips may help here.
1) You can debug features by putting 'debugger' in the step file. Just
make sure there is a line after debugger
e.g
...
debugger
response
end
If there's nothing after debugger you will stop in the cucumber code,
which is not what you want.
2) You can also pu
What you're doing here is writing imperative features. Writing
declarative features might be a better alternative. Instead of
Given I am on the new entity page
When I fill in a textbox labelled "Common Name" with "My New Entity"
And I fill in a textbox labelled "Full Legal Name:" with "My N
James Byrne <[EMAIL PROTECTED]>:
> Andrew Premdas wrote:
>> What you're doing here is writing imperative features. Writing
>> declarative features might be a better alternative. Instead of
> ...
>>
>> Given I am on the new entity page
>> When I c
I did something similar with
Scenario: Cart shows item price and total price
Given there is a product with name foo and price £24.50
And I am on the products page
When I add product with name foo to cart
And a step matcher
When /^I add product with name (.*) to cart$/ do |name|
p
Don't know if this is related, but webrat 0.3.4 introduced a bug with
redirecting which I reported at
http://webrat.lighthouseapp.com/projects/10503/tickets/67
Wonder if your problem happens with webrat 0.2?
2008/11/20 aslak hellesoy <[EMAIL PROTECTED]>:
> On Thu, Nov 20, 2008 at 2:52 PM, kwe <
Also occasionally you may want to use a when as a given. Cucumber
doesn't actually use the given|when|then|and to differentiate steps,
just the regex that comes after them. Sometimes I feel that it makes
sense as in the following examples
When I log in as Fred
Given I log in as F
DOH
I thinks convention = I think this convention
2008/11/21 Andrew Premdas <[EMAIL PROTECTED]>:
> Interesting ... so this establishes a convention to use in features
> that all Givens are written in the past tense and all whens in the
> present tense.
>
> I think its qu
ot alot of Givens to rewrite :)
2008/11/20 David Chelimsky <[EMAIL PROTECTED]>:
> On Thu, Nov 20, 2008 at 10:40 AM, Andrew Premdas <[EMAIL PROTECTED]> wrote:
>> Also occasionally you may want to use a when as a given. Cucumber
>> doesn't actually use the given|whe
1 - 100 of 223 matches
Mail list logo