following is the method of the helper
module ApplicationHelper
def tab_class(tab)
'class=active' if tab == params[:controller]
end
end
i write the spec method as follows
describe ApplicationHelper do
it should be active if controller is same do
On Tue, Apr 14, 2009 at 8:24 AM, Salil Gaikwad li...@ruby-forum.com wrote:
following is the method of the helper
module ApplicationHelper
def tab_class(tab)
'class=active' if tab == params[:controller]
end
end
i write the spec method as follows
describe ApplicationHelper do
it
Good idea. It's at http://gist.github.com/95033
And as I said before, it's pretty hacky :)
- Korny
On Tue, Apr 14, 2009 at 3:11 PM, aslak hellesoy aslak.helle...@gmail.comwrote:
On Tue, Apr 14, 2009 at 6:06 AM, Korny Sietsma ko...@sietsma.com wrote:
In case anyone followed this: I got
On Tue, Apr 14, 2009 at 11:00 AM, AndreXP andre.x.pretor...@gmail.comwrote:
Hi All,
This morning I did a gem update which installed rspec-1.2.4 and when I
run my cucumber rake features command I got the following:
Try the latest Cucumber code (aslakhellesoy-cucumber gem). This was fixed
Fixed :) I should have looked in lighthouseapp for this ticket..!!
Thanks for the speedy reply.
Andre
Aslak Hellesoy wrote:
On Tue, Apr 14, 2009 at 11:00 AM, AndreXP
andre.x.pretor...@gmail.comwrote:
Hi All,
This morning I did a gem update which installed rspec-1.2.4 and when
I
run
Could be wrong, but what about removing the stipulation that each call
should be received once?
Is that superfluous to requirements, there? I think so.
You've already specified three calls in order, so that should cover it.
2009/4/14 Nigel Thorne nigel.tho...@gmail.com
Hi Folks,
I want to
On Tue, Apr 14, 2009 at 11:34 AM, Korny Sietsma ko...@sietsma.com wrote:
I should clarify what might not be obvious from the code:
This builds two sets of pages in the wiki:
- Features, which are basically just a dump of the features files into wiki
format, added as children of the main
Hi All,
This morning I did a gem update which installed rspec-1.2.4 and when I
run my cucumber rake features command I got the following:
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:142:in `activate': can't activate
rspec (= 1.2.2, runtime), already activated rspec-1.2.4
(Gem::Exception)
I should clarify what might not be obvious from the code:
This builds two sets of pages in the wiki:
- Features, which are basically just a dump of the features files into wiki
format, added as children of the main Features page (confluence lets you
have parent/child relationships, which is great
Hi,
I've read on the 'Cucumber Backgrounder' page that running cuc via
rake, command line and autotest could give different results but I
seem to get different results depending on the path I pass cucumber
and am not sure what's going on. I would be grateful for any help or
insight.
it gives me following error
undefined local variable or method `params' for
That's normal. Remember that params exists because there is an http
request issued. In your spec, you don't tell Rspec anything about any
request. So you could create a mock for params. If I recall correctly
you
Hi,
#env.rb
class ProjectWorld
include Spec::Matchers
def browser
@browser ||= Browser.new
end
end
World do
ProjectWorld.new
end
Instead of using explicit getters here, can I not use attribute readers?
Aidy
___
rspec-users
On Tue, Apr 14, 2009 at 1:32 PM, Jeremiah Heller
jeremiah.hel...@gmail.comwrote:
Hi,
I've read on the 'Cucumber Backgrounder' page that running cuc via rake,
command line and autotest could give different results but I seem to get
different results depending on the path I pass cucumber and
Fernando Perez wrote:
it gives me following error
undefined local variable or method `params' for
That's normal. Remember that params exists because there is an http
request issued. In your spec, you don't tell Rspec anything about any
request. So you could create a mock for params. If
On Tue, Apr 14, 2009 at 2:19 PM, aidy lewis aidy.le...@googlemail.comwrote:
Hi,
#env.rb
class ProjectWorld
include Spec::Matchers
def browser
@browser ||= Browser.new
end
end
World do
ProjectWorld.new
end
Instead of using explicit getters here, can I not use attribute
Try with that:
controller.stub!(:params).and_return({:controller =
'your_controller_name'})
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
it should be active if controller is same do
params = {:controller = 'royalty_statement'}
tab_class('royalty_statement').should include('active')
end
but it doesn't work out. it gives me same error as previous.
Nah it doesn't work that way, because remember that RSpec is just
Try with that:
controller.stub!(:params).and_return({:controller =
'your_controller_name'})
Nah it doesn't work out,gives same error.
neways thanx for the info.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
helper.stub! the OP is testing a helper method.
On Tue, Apr 14, 2009 at 9:04 AM, Fernando Perez li...@ruby-forum.comwrote:
Try with that:
controller.stub!(:params).and_return({:controller =
'your_controller_name'})
--
Posted via http://www.ruby-forum.com/.
http://github.com/bmabey/email-spec/blob/cdf3eeda4d28ef8b35bbce8af9ca7c493528332d/examples/rails_root/spec/models/user_mailer_spec.rb
-Ben
I try following and it works. i don't know how but it pass the test
gives me 100% coverage and also i receive a test email.
describe ApplicationHelper
On Apr 13, 11:26 am, Pat Maddox pat.mad...@gmail.com wrote:
If this is a module that you're using to extend the behavior of
Numeric classes, just mix it in somewhere and write examples for the
class that got the mixin.
I prefer to test modules in isolation by mixing them into a stub in
the
Hi,
The rails plugin for vim has limited RSpec support, and it mentions how to
add extra commands such as speccontroller, etc, with Rcommand.
Has anyone done this? I'm not very good with the syntax of .vimrc, so I
don't know how to enter these. I think it said I need to use autocmd, but
Hi Guys,
My nightly tests stopped working suddenly over the weekend. Not sure
why yet. It's wierd because they just look like the exited without a
clue mid-test. Nothing in the logs is a smoking gun.
Here's my question: It seems like the contents of features.txt do not
get written until the
On Tue, Apr 14, 2009 at 7:19 PM, Tim Walker walke...@gmail.com wrote:
Hi Guys,
My nightly tests stopped working suddenly over the weekend. Not sure
why yet. It's wierd because they just look like the exited without a
clue mid-test. Nothing in the logs is a smoking gun.
Here's my question:
The full changelog is here:
http://github.com/aslakhellesoy/cucumber/blob/98eefc22f50371e8c3bd02ef8715176d6f586198/History.txt
Enjoy!
The Cucumber team (Aslak, Joseph, Ben)
___
rspec-users mailing list
rspec-users@rubyforge.org
One simple thing I asked about the other day was running multiple instances
of autotest to do different things. Currently I'd like to run one for my
specs and one for my features, but you could easily extend this idea.
Creating several profiles that run at the same time, with the long running
ones
On 14 Apr 2009, at 05:41, aslak hellesoy wrote:
crud_admins.feature; just has a single step:
Scenario: Create an admin user
Given I can see the form to create an admin user
crud_admins_steps.rb; just has a single step-def:
Given I can see the form to $action a(n)?
Sorry. This is running from cruisecontrol rb:
---
Cucumber::Rake::Task.new(:cruise) do |t|
t.cucumber_opts = -r features/cucumber_env --format pretty
--out=#{ENV['CC_BUILD_ARTIFACTS']}/features.txt --format html
--out=#{ENV['CC_BUILD_ARTIFACTS']}/features.html
t.rcov = true
We're trying to verify XML REST API's and would like to write Cucumber
specs of the following type:
Scenario: Create a phrase
Given I have an authenticated session for user with login steve
When I send a POST to /phrases with parameters: locale=ca and post
body
?xml version=1.0
Copy paste mistake: We did escape the quotes inside the XML stanza,
result is the same.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Apr 14, 2009, at 5:39 PM, Wolfram Arnold wrote:
We're trying to verify XML REST API's and would like to write Cucumber
specs of the following type:
Scenario: Create a phrase
Given I have an authenticated session for user with login steve
When I send a POST to /phrases with
On Tue, Apr 14, 2009 at 8:37 PM, Ben Mabey b...@benmabey.com wrote:
Have you tried the pystring syntax?
Given I want to have multiple lines
I can pass them
in with three quotes...
How does that parse into a step definition? Would it be:
Given /^I want to have multiple lines\n(.*)$/m
On Tue, Apr 14, 2009 at 10:37 PM, Stephen Eley sfe...@gmail.com wrote:
On Tue, Apr 14, 2009 at 8:37 PM, Ben Mabey b...@benmabey.com wrote:
Have you tried the pystring syntax?
Given I want to have multiple lines
I can pass them
in with three quotes...
How does that parse into a step
On Tue, Apr 14, 2009 at 10:37 PM, Stephen Eley sfe...@gmail.com wrote:
Sorry if I'm asking dumb questions, but I was trying to look this up a
few weeks ago myself to represent some example Markdown data, and
eventually gave up. This isn't documented anywhere that I could find.
I've also
Stephen Eley wrote:
On Tue, Apr 14, 2009 at 10:37 PM, Stephen Eley sfe...@gmail.com wrote:
Sorry if I'm asking dumb questions, but I was trying to look this up a
few weeks ago myself to represent some example Markdown data, and
eventually gave up. This isn't documented anywhere that I could
On Tue, Apr 14, 2009 at 10:37 PM, Stephen Eley sfe...@gmail.com
wrote:
Sorry if I'm asking dumb questions, but I was trying to look this
up a
few weeks ago myself to represent some example Markdown data, and
eventually gave up. This isn't documented anywhere that I could
find.
I've
On Wed, Apr 15, 2009 at 1:12 AM, Aslak Hellesøy
aslak.helle...@gmail.com wrote:
Allright allright. You *will* be allowed into Cucumber heaven :-)
Woohoo! That makes me so happy that I won't share any of the dirty
jokes that sentence evokes. 8-
--
Have Fun,
Steve Eley (sfe...@gmail.com)
37 matches
Mail list logo