Looks like it " expected following output to contain a Sign
up
tag:" and the output's title tag is "Ruby on Rails Tutorial Sample
App | ".
I am pretty new to rspec and testing in general, but it looks like fixing
the page title will make this test pass.
On Tue, Nov 6, 2012 at 2:42 PM, Drew Davi
I'm missing something in my setup of rspec-rails in a rails 3
project. I've included the link to the gist. It seems that it
doesn't recognize rails routes for some reason...getting "undefined
local variable or method". The spec file I'm running is sitting in
spec/integration, if that matters. T
Dear list,
Today I am working through the simple tutorial here:
http://wiki.github.com/aslakhellesoy/cucumber/ruby-on-rails
It has me install Cucumber-Rails and then create a feature.
Then I watch the feature fail when I run
rake cucumber
Then I watch the feature pass after I implement some c
Robertico,
Provided you can match the items you need to click, select, fill in and
alter with CSS (see assert_select:
http://blog.labnotes.org/2006/09/04/assert_select-cheat-sheet/) selectors,
you can do all of these things
-- Lee Hambley
Twitter: @leehambley | @capistranorb
+1
-- Lee Hambley
Twitter: @leehambley | @capistranorb
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1
2009/11/6 Tom Stuart
> On 5 Nov 2009, at 11:59, Conrad Taylor wrote:
>
>> Hi, the following page needs to be updated to use spork instead of
&g
David, great quick response, thanks - lets hope our action condenses the
nonsense round here.
-- Lee Hambley
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Matt,
Thats a good start, can I suggest adding it to the google group homepage,
whoever has admin control?
-- Lee Hambley
Sent from my iPhone.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
but
in our case (as most will agree) - we do indeed have a documentation
problem.
-- Lee Hambley
Twitter: @leehambley | @capistranorb
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1
2009/10/28 Vishu Ramanathan
> Lee's frustration is not groundless. In my few wee
Rick,
You could hack the TM_RUBY variable, or if you launch Texmtate from the
command line, it will inherit that terminal's RUBY values (also $PATH, $ENV,
etc)
-- Lee Hambley
Twitter: @leehambley | @capistranorb
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1
2009/
This topic is raised once a month by someone from India with no "search"
skills - please check the list for similar questions.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Sam,
As the .any_instance call suggests, anything ever again for the duration of
the test will stub that value, the alternative is this:
Foo.any_instance.stubs(:valid?).returns(false)
replace with this
foo = Foo.new
foo.stubs(:valid?).returns(false)
HTH
- Lee
Willy...
Should you not use .should_not ?
-- Lee
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
John,
I may well be wrong, but I believe it's just a `tag` or name, so when you
print out - you see <#Double customer> rather tahn something
inexplicable, that is at least how it appears to work using Mocha
- Lee
___
rspec-users mailing
ve been writing this draft for so long, David C has also
answered, I am as interested as you to read that, so HTH.
-- Lee Hambley
Twitter: @leehambley
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1
2009/7/20 Marcelo de Moraes Serpa
> Hello list,
>
> I have an e
Makes perfect sense. Thanks for the tip Matt!
On 12 June, 09:43, Matt Wynne wrote:
> On 12 Jun 2009, at 08:34, Lee wrote:
>
>
>
> > In my controller's create method, I have:
>
> > @sub_context = @context.create_sub_context(params[:context][:name])
>
> >
In my controller's create method, I have:
@sub_context = @context.create_sub_context(params[:context][:name])
If I do not specify params in the "post :create" call in my controller
spec then I get the following error for each example:
You have a nil object when you didn't expect it!
You might ha
Thank you everyone for your helpful insights.
I had already gone down the route suggested by Zach but it was
nevertheless very re-assuring to have my approach validated as I am a
newbie to RSpec. I did however consolidate my expectations e.g.:
context "when the member is a privileged member of
, "sub_menu" is defined in the helper file
for the controller "contexts". How do I get the spec to "see" this
file and its contents when executed? I think It's seeing "main_menu".
Thanks.
On 5 June, 17:39, Stephen Eley wrote:
> On Fri, Jun 5, 200
I am driving out a view that renders a list of items with which a
logged in member is associated.
Against each item, one or more links may be rendered according to the
member's role with respect to the item (item owner, item
administrator, regular user etc). Each link represents a type of
function
I am driving out a view and I want to test that a link is displayed.
The link_to code for the link is included in the layout for the view
rather than the view template itself.
Here's my example:
it "should display a link to create a new zone" do
render "contexts/index.html.erb", :layout =>
Scott, Last mondayish ?
- Lee
2009/5/27 Scott Taylor
> David Chelimsky wrote:
>
>> On Wed, May 27, 2009 at 5:20 AM, Smita Sreekanth
>> wrote:
>>
>>
>>> Hi,
>>>
>>> We run the feature created for a form to identify the fields and als
> I can't remember if you can do that, to be honest. I think the hash of
> parameters to stub_model is used to set up stubs on the object - so
> they won't get passed to the constructor. Hopefully someone else on
> the list should be able to tell you if this is possible.
Matt, I have since looked
Thanks Matt. Very helpful.
I have tried out stub_model. The constructor of one of my models
(Namespace) requires a mandatory :name attribute to be provided. So
when I try to stub_model it - e.g. representative_namespace =
stub_model(Namespace) - I get the following spec error.
1)
RuntimeError in
I am trying to specify a controller with RSpec for the first time.
I have been using mock_model to date but, given that the models are fully
implemented, I am wondering if I should be using stub_model.
Based on what I have read, I am struggling to understand the advantages that
stub_model over
Excellent news, thankyou Aslak, this was exactly what I was hoping for.
2009/5/18 aslak hellesoy
> David Chelimsky and I have decided that it's now best to create a
> separate mailing list for Cucumber.
> The RSpec mailing lists remain the same, but we're hoping that you
> will all move Cucumber
Anil,
Your precondition shouldn't fail?
- Lee
2009/5/18 Anil Gollaa
>
> Hi,
> Generally in cucumber, we write the preconditions in GIVEN block,
> Is there any way in cucumber using which test scenario execution is
> skipped, based on the Given block execution.
> Becau
mel's back and prompted me to post this thread
- Lee
2009/5/18 Jonathan Linowes
> makes no difference to me, if the list were to split, i'd subscribe to both
> so I'd see the same signal and noise.
>
> --linoj
>
>
> __
are using the rspec+cucumber stack with
MRI ruby, and a rails project, it doesn't get more mainstream for rspec and
cucumber than that, but even so I find most of the rspec centric
conversations on the list to be distracting and confusing.
Considerately,
- Lee
2009/5/18 Zach Dennis
> On M
ater today.
The SNR ratio is absurd, and the list users should really consider a split.
Thanks for the things I've learned, and the tips and tricks that I have been
fortunate enough to pick up.
- Lee
___
rspec-users mailing list
rspec-user
o spec this expected behaviour?
In particular, I can't work out how to specify that logged_in_member is called.
Thanks,
Lee.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
=> "fred"}
>
> And then in the controller 'create' method:
>
> Context.new params[:context]
On 15 May, 07:28, Lee wrote:
> I have been trying to spec a Rails Controller for the first time,
> having just completed my first View spec.
>
> Having hit
I have been trying to spec a Rails Controller for the first time,
having just completed my first View spec.
Having hit a wall trying to spec a controller for my own application,
I have tried to get an example in beta of The RSpec Book to work. I am
however experiencing the same failures. I would a
point of writing RSpec view specs. Some
replies seem to suggest the use of Cucumber with Culerity/Webrat/
Selenium and I read into this that one would bypass view specs for the
AJAX related steps and just write the necessary view code (e.g.
JavaScript or Rails Prototype helpers) to get the step to p
Thanks Matt.
I have been trying out Cucumber and Culerity (Celerity) but rather
than jump directly from Cucumber to coding the necessary views,
controllers and models required for each scenario, I wanted to drive
out the code using RSpec. So I've started to spec a view required by a
scenario, and
eventually run the e2e Cucumber
scenarios.
On May 12, 3:04 pm, Mike Doel wrote:
> On May 12, 2009, at 8:36 AM, Lee Longmore wrote:
>
> > I am new to RSpec and have just started to drive out my first Rails
> > view using a spec. I have used the The RSpec Book (beta) to do the
&g
My apologies! I posted twice by accident. Please see my other post on
this topic.
On May 12, 1:31 pm, Lee wrote:
> I am new to RSpec and have just started to drive out my first view
> using a spec. I have used the The RSpec Book (beta) to do the basic
> stuff like testing for the pres
Nokogiri. Is my understanding correct?
Or is this your preferred approach but there are others?
On May 12, 2:42 pm, Phlip wrote:
> Lee Longmore wrote:
> > I am new to RSpec and have just started to drive out my first Rails view
> > using a spec. I have used the The RSpec Book (beta)
I am new to RSpec and have just started to drive out my first view
using a spec. I have used the The RSpec Book (beta) to do the basic
stuff like testing for the presence of a field but I am unsure where
to start for driving out some AJAX functionality.
In the view, I will have a text field that a
I am new to RSpec and have just started to drive out my first Rails view using
a spec. I have used the The RSpec Book (beta) to do the basic stuff like
testing for the presence of a field but I am unsure where to start for driving
out some AJAX functionality.
In the view, I will have a text fie
Hi List,
We didn't resolve this in the end, we rolled back to Cucumber 0.3.0; has
anyone else seen anything similar?
- Lee
2009/4/30 Julian Leviston
> I have NO idea if this is relevant, but the way you extend worlds has
> changed, I'm fairly sure.
> Julian.
>
>
>
Hi Julian,
You can do just that, the scenarios stack like that quite well, and it is
reasonable to call a step from another, but you should have something like
Scenario: Logging In
Given there is a user
When I visit the login page
And I fill in username with ...
And I fill in passowrd with ..
Hi Ben,
Please see this Gist http://gist.github.com/104711 - note also that it
doesn't seem to matter about the dependencies I've got in that file now,
they're a recent addition and don't seem to affect this behavior.
- Thanks,
Lee
2009/4/30 Ben Mabey
> Lee Ham
is goes away
if we roll back to 0.3.0.
- http://gist.github.com/104429
I also listed the relevant local gems as far as I can see, I'll post back
here if I come up with anything, pointers or suggestions would be welcomed!
Thank you,
Lee Hambley
___
code base, how
do I synch RSpec with these?
That is, do I need to generate RSpec models and controllers for each of these
existing models and controllers?
If so, is there I anything I should be aware of when doing so?
Many thanks,
Lee.
mobile: +44(0)775 392 8067
home: +44(0) 208 8358256
yes indeed, thanks
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
no matter how I try to stub! it still showing this error
I have the following in my spec
Profile.stub!(:new).and_return(@profile = mock_model(Profile))
Then
(rdb:1) @profile.stub!(:user)
#,
@name="Pr
ofile_1300">>,
@args_expectation=#], @match_any_args=true>, @args_to_yield=[],
@method_block
Hi all,
We've recently been kicking around different ideas for simulating user
behaviour for the purposes of load testing our backend. We hit on the
idea of having user stories do double duty for both verifying behaviour
and (if selected stories were driven en-masse by a distributed network
o
As you are on Windows can I suggest you try removing all of the options from
your spec.opts file and try again. You need to do this with native windows
but not sure about cygwin.
Worth a try.
On 10/31/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On Oct 31, 2007 9:30 AM, pangel <[EMAIL PROTE
Andrew WC Brown wrote:
> I'm going through Peepcode's Rspec Basics for an overview.
>
> He's just doing a simple spec:
>
> class PeepCode
> end
>
> describe PeepCode do
> it "should be awsome" do
> end
> end
>
> So running spec spec/simple_spec.rb should produce according to his
> screen cast
49 matches
Mail list logo