I didn't think of looking in closed bugs :) I guess the fix has not made
into the current release.
I think this gives me enough clues as to what I need to do to fix it though,
thanks
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyfor
Hi,
After upgrading to rails 3.1 and rspec-rails 2.6.1 I get the following
deprecation warning, however as far as I can tell I am not defining any
examples before it is called.
I am using the default spec_helper generated with rails g rspec:install so
why this warning?
Thanks
***
In your spec_helper...
RSpec.configure do |config|
# setup transactional factory for sequel, when running transactional
tests
config.around(:each, :transactional => true) do |example|
Sequel::DATABASES.first.transaction do
example.run
raise Sequel::Error::Rollback
end
en
On Jan 13, 10:36 am, Kurt wrote:
> Hi -- Thanks for sharing all your tips. I couldn't understand your
> line about what replaces have_text, however. I don't see a method
> called "matches" or "match"...
Sorry that should be...
response.body.should match(/../)
it is the standard text regexp ma
usually loaded first pulls something in that you needed?
Thanks
On Jan 2, 10:15 pm, David Chelimsky wrote:
> On Sun, Jan 2, 2011 at 11:51 PM, David Chelimsky wrote:
> > On Sun, Jan 2, 2011 at 11:01 PM, Jim Morris wrote:
> >> Ok I re installed rspec-rails 2.4.0 looks like my requ
2010.02/lib/ruby/gems/1.8/gems/
rspec-core-2.4.0/lib/rspec/core/runner.rb:10:in `autorun'
from /opt/ruby-enterprise-1.8.7-2010.02/bin/rspec:19
On Jan 2, 8:12 pm, Jim Morris wrote:
> Yes I can, the full app is onhttps://github.com/wolfmanjm/wolfmanblog_rails
> althou
> The problem is with rspec-cells, but I'm not clear yet on the root
> cause. Something to do with the way it's hooking itself into the
> framework is failing.
I totally removed rspec-cells from my gems and bundle, but I still get
the same failure, so I'm not convinced it is rspec-cells, it did g
On Sun, Jan 2, 2011 at 9:09 PM, Jim Morris wrote:
> > I just upgraded from 2.3.1 and I now get this error on all my specs...
> > Nothing else changed and the Upgrade.md does not indicate any backward
> > compatibilities unless I missed something.
>
> > (in /home/morri
ound(:each, :transactional => true) do |example|
Sequel::DATABASES.first.transaction do
example.run
raise Sequel::Error::Rollback
end
end
end
# to make factory girl run with sequel
class Sequel::Model
def save!
save(:validate=>false)
end
end
On Jan 2, 7:46 pm, Da
I just upgraded from 2.3.1 and I now get this error on all my specs...
Nothing else changed and the Upgrade.md does not indicate any backward
compatibilities unless I missed something.
(in /home/morris/work/ruby/rails3/wolfmanblog)
/opt/ruby-enterprise-1.8.7-2010.02/bin/ruby -S bundle exec rspec .
Never mind sorry for the noise :) Guess I shouldn't have been working
so late at night ;)
I left out the it block!
On Dec 27, 8:39 pm, Jim Morris wrote:
> Hi, I have a working application_helper_spec.rb, and now I created a
> posts_helper_spec.rb in the spec/helpers directory.
>
Hi, I have a working application_helper_spec.rb, and now I created a
posts_helper_spec.rb in the spec/helpers directory.
But it looks like rspec is not treating it as a helper spec, the
helper returns null and mocks and stubs are not recognized, and the
before is not being executed, and even my sp
am, David Chelimsky wrote:
> On Dec 22, 2010, at 2:51 AM, Jim Morris wrote:
>
> > Hi, not exactly sure if this is a cells bug or an rspec (or both), but
> > when running a simple request spec
> > from the spec/requests directory gets an error whereas running it from
>
Hi, not exactly sure if this is a cells bug or an rspec (or both), but
when running a simple request spec
from the spec/requests directory gets an error whereas running it from
the RAILS ROOT directory it works..
Seems it cannot find the view in the cells directory.
The full project is in https://
I am trying to upgrade a Rails 2.2.2 app to Rails3, its a pain ;)
Part of this is I need to upgrade all my Specs to RSpec2, as this info
does not seem to be in any one place, here is a summary of what I
needed to do...
* needed to rename all my views from .haml to .html.haml,
(or .html.erb) alth
This his been discussed but the only definitive answer (kinda) was
use...
describe "a description" do
system { SomeController }
end
However when I do that I get this error...
@controller is nil: make sure you set it in your test's setup method.
I used to use controller_name :somecontroll
cool that did fix it. thanks
On Nov 30, 6:34 am, David Chelimsky wrote:
> On Nov 29, 2010, at 8:05 PM, Jim Morris wrote:
>
>
>
> > Hi David,
>
> > I am using the current versions of everything rspec
> > rspec (2.2.0,)
> > rspec-core (2.2.1)
> > rspe
group or is this an rspec/webrat/
rails3 issue?
On Nov 29, 2:45 pm, David Chelimsky wrote:
> On Nov 29, 2010, at 4:44 PM, David Chelimsky wrote:
>
>
>
>
>
> > On Nov 29, 2010, at 3:28 PM, Jim Morris wrote:
>
> >> Sorry I may have been unclear
>
> &
Rack::Test::Methods
It now sees last_response but doesn't get a respnose from visit (That
may be a different errror).
So bottom line is using the latest rails/rspec/webrat does not work
out of the box.
On Nov 29, 7:18 am, David Chelimsky wrote:
> On Nov 29, 2010, at 4:58 AM, Jim
r
#
comes from the p response.body
On Nov 29, 7:18 am, David Chelimsky wrote:
> On Nov 29, 2010, at 4:58 AM, Jim Morris wrote:
>
>
>
> > Ok adding
>
> > include Rack::Test::Methods
>
> > to my spec_helper changed the error to
>
> > Failure/Error: visit
Ok adding
include Rack::Test::Methods
to my spec_helper changed the error to
Failure/Error: visit "/"
No response yet. Request a page first.
# /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rack-
test-0.5.6/lib/rack/mock_session.rb:51:in `last_response'
# /opt/ruby-
I don't get the stack level too deep but I do get
undefined method `last_response' for
#
Which was supposed to be fixed ages ago.
So did one fix break another?
I have webrat using :rack config
rspec 2.2.0, rspec-rails 2.2.0, webrat 0.7.2, rails 3.0.3
It looks to me like the webrat rack adapt
I don't know if this will interest anyone, but I thought it was a
pretty cool use of Cucumber :)
I've posted a Blog article on how I use Cucumber to test an Erlang
Server directly by talking to my Erlang Nodes.
http://blog.wolfman.com/articles/2009/5/2/using-cucumber-to-test-erlang-servers
It us
Hi,
Given the hook:
After do |scenario|
end
How do I get the name of the scenario from the scenario parameter?
scenario.name doesn't work, and I looked through the source code and
it was not immediately obvious to me.
Thanks
___
rspec-users mailing
Hi,
I was surprised by this so I suspect it may be a bug.
I have a Scenario Outline, and a Background in my Feature and nothing
else,
The Background got executed 1 more time than expected.
Details are the Scenario Outline had 4 entries in the table, so I
expected 4 scenarios to get executed, an
deimos1986 wrote:
> Hi Jim,
> Just want to say thanks for fixing this. It blocked me for a day
> trying to figure out what broke. Any chance of trying to get this
> pulled into david's branch as most tutorials reference his branch.
>
> Cheers,
> Matt
It was Justin, I just benefited from his work.
Yet another way to do fixtures/factories is a hybrid that I outline in
my blog, its basically what I do.
http://blog.wolfman.com/posts/42
Basically I can't use the existing libraries as I am not using
ActiveRecord.
On Feb 5, 8:17 am, Ben Mabey wrote:
> David Chelimsky wrote:
> > I highly recom
Well sometimes one can't use an existing library becuase of some
reason or other, like in my case not using ActiveRecord.
So I came up with yet another way to do it, I think it is a hyvrid
between Fixtures and Factories.
outlined here...
http://blog.wolfman.com/posts/42
On Feb 7, 8:16 am, Jay
Jim Morris wrote:
> Justin Smestad wrote:
>> Daniel, I have fixed this in my fork:
>> http://github.com/jsmestad/merb_cucumber/tree/master
>>
>
> I still get the same error after installing
> jsmestad-merb_cucumber-0.5.1.3 from gems.github.com
> Did the versi
Justin Smestad wrote:
> Daniel, I have fixed this in my fork:
> http://github.com/jsmestad/merb_cucumber/tree/master
>
I still get the same error after installing
jsmestad-merb_cucumber-0.5.1.3 from gems.github.com
Did the version get bumped OK? or do I need to clone and build locally?
Thanks
-
...etc...
end
I have a custom hpricot matcher which provides the have_xpath matcher
Yes this is stateful, but the @hdoc variable is central to the tests and I don't see any other way
to carry the response from the When to the Then, unless you combine the step in a then and skip the
when, s
e have_xpath matcher
Yes this is stateful, but the @hdoc variable is central to the tests and I don't see any other way
to carry the response from the When to the Then, unless you combine the step in a then and skip the
when, so you don't have to carry state
ion state which must
change either way or you're not testing anything.
Thats true in that case. I also wouldn't do what you show in the second case. If I can get the
result from the API or the database I would.
In my case I store data between states that I
o the same scope as the steps.
Good that'll make the transition easier I hope.
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Rails I would undoubtedly do it the way you suggest :)
Matt Wynne wrote:
On 9 Sep 2008, at 19:52, Jim Morris wrote:
aslak hellesoy wrote:
The debate seems to be whether step definitions should be stateful or
not.
In practice this is achieved by setting one or more @variables in a
step and
succeeed due to a previously successful scenario.
I'd definitely be interested in better ways to do this though, as I hate passing global variables
around (as I said in an earlier post I can't use @variable because the before_scenario does not seem
to have access to the same scope as t
ever,
you hear me?
Hmmm well OK I'll try to never use them ;)
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
hen to check the database
actually got setup the way I expected by a previous When, as well as checking the returned XML from
the Rest-API call.
As always YMMV
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Hi,
I'm looking at the examples in cucumber, and I see the fit-like tables, but for the life of me I
don't see how they map to the steps, ie how does the table data get fitted into the steps parameters.
Maybe some documentation for these tables is in order ;)
Thanks
Jim
--
Jim Mo
u]
end
$last_error= nil
$roomid= nil
$roomobjectid= nil
$last_doc= nil
$bagid= nil
end
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
o.
I'd like to have a before story and after story as well as a before scenario
and after scenario.
Right now I do global setup for a story, and cleanup when the story is done. I also do a setup
before each scenario as well.
It would be nice to have the ability to do both.
Thanks
--
Jim
sts is not a good use of my time. If you were to reword deprecation to frozen I'd be a lot happier
:) then I can leave my old tests alone and use cucumber for new tests.
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
o use the latest RSpec.
I suggest that cucumber stay separate, and RSpec keep the story runner, either
as core or as an add on.
Deprecating something that is being used extensively will not make your users
happy.
--
Jim Morris, http://blog.wolfma
Jim Morris wrote:
I have a bunch on non-rails stories, and I want to run them all with
either a rake task or a script.
I tried the all.rb approach from rails, but is doesn't seem to work.
I do this basically...
dir = File.dirname(__FILE__)
tests= []
%w(story1 story2 story3).each
tests << File.join(dir, f) + ".rb"
end
puts "Testing: #{tests.join(',')}"
tests.each do |file|
require file
end
Should this work?
Some of the stories run OK, but some seem to not be setup properly, they run fine if run
individually from the command line
byforge.org/mailman/listinfo/rspec-users
--
Regards,
Robert
--------
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ntegration testing seems to work very nicely,
thank you!
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
f'
@output.flush
@scenario_ok = false
end
def collected_steps(steps)
end
def method_missing(sym, *args, &block) #:nodoc:
# noop - ignore unknown messages
end
end
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
When running a lot of stories from a script it would be nice to have the plain format of dots rather
than the verbose story descriptions.
Is there a way to do this? I tried -f p but it ignored it.
Thanks
--
Jim Morris, http://blog.wolfman.com
end
nil
end
I also updated my blog post on this topic to cover the new syntax...
http://blog.wolfman.com/articles/2007/07/14/using-rspec-to-test-haml-helpers
--
Jim Morris, http://blog.wolfman.com
___
rspec-users mailing list
rspec-users@rubyforg
_________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
--
Jim Morris, http://blog.wolfman.com
_______
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/m
into the HelperObject? I just don't know how to
do that.
I am using the latest version of HAML but I am still using rails 1.2.6
Any ideas?
Thanks
Jim
David Chelimsky wrote:
On Jul 2, 2008, at 7:12 PM, Jim Morris wrote:
Hi,
Many moons ago I wrote this blog entry...
http://blog.w
when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]
/.../app/helpers/application_helper.rb:23:in `test_flash'
...
flash is nil, this used to work, so what is the new magic incantation to get
this to
Attached is a custom matcher using hpricot, (and the spec for it) it has a
"have_xpath matcher for
checking xml.
I has an earlier one using rexml but hpricot is faster, you can read about that
here
http://blog.wolfman.com/articles/2008/01/02/xpath-matchers-for-rspec
This new hpricot one i
or the Givens I
> think it's perfectly acceptable to just "make it so". Whether that's putting
> some value in a session or shoving some data in a table. It's only the When
> steps that should be duty bound to operate the app like a regular user,
> because that&
fter(&block)
setup_listener(listener)
end
Use it in your story ruby file thusly...
require File.join(File.dirname(__FILE__), "spec_helper")
# execute this code before story runs
before_story do
#stuff
end
# execute this code after the story runs
after_story do
# more stuff
en
.Started story #{title}"
end
def story_ended(title, narrative)
puts "...Ended story #{title}"
end
end
Spec::Story::Runner.register_listener(MyListener.new)
On Jun 17, 3:38 pm, Ben Mabey <[EMAIL PROTECTED]> wrote:
> Jim Morris wrote:
> > Hi, Not top posti
Hi,
I am confused (a normal state for me) about the State-Of-The-Art Story
API to use.
examples/calculator.rb has one syntax, the Blogs have another Syntax,
so do the various tutorials.
I realize that Stories are ongoing work, but it would be nice if there
were something I could refer to to make
Hi, Not top posting (although I prefer it ;)
>
> Cool. Are you talking directly through ruby constructs or through a
> browser tool like selenium?
I have a helper that makes posts and gets and deletes and puts
directly to the server which is implements a mostly REST-ful API and
written in Java.
I
narrative)
puts "...Ended story #{title}"
end
end
Spec::Story::Runner.register_listener(MyListener.new)
Then I define my steps using StepGroup.new
Then the Scenarios
It seems to work although not very intuitive :)
I'd prefer a before(:all) and after(:all)
On Jun 16, 11:5
pm, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Jun 16, 2008, at 6:18 PM, Jim Morris wrote:
>
> > Along similar lines is there a way to do the equivalent of
> > before(:all) and after(:all) or after(:each) in stories?
>
> > Basically I have a similar situation as ab
Along similar lines is there a way to do the equivalent of
before(:all) and after(:all) or after(:each) in stories?
Basically I have a similar situation as above, but I need to make sure
the user is logged out after each scenario. or that the user is logged
in once at the start of all scenarios th
62 matches
Mail list logo