I loved that 'Let me google that for you' thing that I remember Dave
replying with once.
http://lmgtfy.com/?q=rspec+tutorial
-lenny
On Oct 28, 2009, at 10:35 AM, Vishu Ramanathan wrote:
Lee's frustration is not groundless. In my few weeks on this list, I
have noticed a lot of requests for
I've always used the idiom of stub collaborations in a before block
and then focus in specific examples with should_receive. (e.g.
should_receive takes presence over stub). I was just attempting to
write an example for caching behavior and ran into something counter-
intuitive, at least IMHO
Forgot to mention: rspec 1.2.9
On Dec 1, 2009, at 11:46 AM, Lenny Marks wrote:
I've always used the idiom of stub collaborations in a before block
and then focus in specific examples with should_receive. (e.g.
should_receive takes presence over stub). I was just attempting to
wri
On Dec 1, 2009, at 1:24 PM, Ashley Moran wrote:
On Dec 01, 2009, at 4:46 pm, Lenny Marks wrote:
This seems dangerous to me. Assuming I hadn't initially stubbed in
the before block and everything worked as expected, if someone
later stubs :lookup in the before block because the
As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of
rspec-rails, '> 2'. I had been using it on occasion for things like:
describe CorrespondencesController do
...
describe '#show' do
it "should raise an AuthorizationError if current user is not the
correspondent " do
On Aug 11, 2011, at 8:59 AM, Justin Ko wrote:
>
>
> On Thu, Aug 11, 2011 at 8:40 AM, David Chelimsky wrote:
> On Aug 11, 2011, at 7:17 AM, Justin Ko wrote:
>
>> On Aug 10, 2011, at 11:13 AM, Lenny Marks wrote:
>>
>>> As best I can tell, bypass_rescue fro
JRuby 1.6.2
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
I'm sure this has more to do with the way JRuby wraps Java exceptions but I
figured I'd post here in case anyone here has any insight or pointers. In the
context of writing a spec for a model like t
>
> On Aug 22, 2011, at 5:50 PM, Lenny Marks wrote:
>
>> JRuby 1.6.2
>> rspec-core (2.6.4)
>> rspec-expectations (2.6.0)
>> rspec-mocks (2.6.0)
>> rspec-rails (2.6.1)
>>
>> I'm sure this has more to do with the way JRuby wraps Java except
One of the things that always annoys me when I write/use typical macros in my
specs is how the backtrace from failures don't include the caller of the macro.
Not a huge deal because the example name can be used to track it down, but I
lose the ability to do things like click on the line from the
On Sep 1, 2011, at 5:03 AM, Jim Morris wrote:
> 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
On Oct 21, 2011, at 11:05 AM, Andrew Premdas wrote:
> On 21 October 2011 10:26, Matt Wynne wrote:
>>
>> On 18 Oct 2011, at 15:02, Jens-Christian Fischer wrote:
>>
>>> Hi there
>>>
>>> I have a weird situation. I have inherited a project in Rails 1.2.3
>>> that has been upgraded to Rails 2.3.1
On Jan 27, 2012, at 9:56 PM, Zach Dennis wrote:
> I would be interested to hear any thoughts from the community about
> the ability to request specific examples from a shared example group
> as expressed in the rspec-requestable-examples gem.
>
> Here's the post that introduces them:
> http://mu
Sorry! My posts are very delayed.
On Apr 17, 2012, at 8:50 PM, Luciano Borges wrote:
> I'm studying Rspec and doing some model's tests.
>
> I have a table with a field which must have two characters, the field should
> not be empty and can not be repeated.
>
> My doubts is with #.
>
> descr
On Apr 17, 2012, at 8:50 PM, Luciano Borges wrote:
> I'm studying Rspec and doing some model's tests.
>
> I have a table with a field which must have two characters, the field should
> not be empty and can not be repeated.
>
> My doubts is with #.
>
> describe State do
> context "validatio
On Aug 22, 2012, at 10:36 AM, David Chelimsky wrote:
> On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote:
>> On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky
>> wrote:
>>>
>>> On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote:
On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde w
On Aug 22, 2012, at 1:38 PM, Lenny Marks wrote:
>
> On Aug 22, 2012, at 10:36 AM, David Chelimsky wrote:
>
>> On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote:
>>> On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky
>>> wrote:
>>>>
Ooops. I meant the -l option not -n.
It seems that '-l' command line option for rspec stopped working as of
rspec 1.1.3. I think this may be related to why I can't get NetBeans
to run focussed specs anymore. Does this work for others? I'm using
jruby but I don't think that's the issue.
ht
Sorry for not replying to the thread but I'm not getting any mail from
rspec-users right now for whatever reason.
It looks like it is an issue specific to jruby.
With rspec-1.1.11 and jruby-1.4
#linenumber_spec.rb
describe "line number" do
it "should be example one" do
true.should be
On Tue, Oct 28, 2008 at 12:31 PM, Lenny Marks
wrote:
> Ooops. I meant the -l option not -n.
>
> It seems that '-l' command line option for rspec stopped working
as of
> rspec 1.1.3.
It's been working for me. I wrote a Vim script that runs the current
spec
(
On Oct 28, 2008, at 5:46 PM, Lenny Marks wrote:
I'm not familiar enough with the rspec code to get to the bottom of
this, but I did enough drilling to find its related to the new
backtrace based strategy for Spec::Runner::SpecParser#spec_name_for
(file, line_number). Putting a
It seems that '-n' command line option for rspec stopped working as of
rspec 1.1.3. I think this may be related to why I can't get NetBeans
to run focussed specs anymore. Does this work for others? I'm using
jruby but I don't think that's the issue.
http://ruby.netbeans.org/issues/show_bug.
On Oct 28, 2008, at 5:46 PM, Lenny Marks wrote:
I'm not familiar enough with the rspec code to get to the bottom
of this, but I did enough drilling to find its related to the new
backtrace based strategy for Spec::Runner::SpecParser#spec_name_for
(file, line_number). Putting a
I'm in the process of trying to get updated to rspec-1.1.11(from
1.1.1). I have a couple of places where I was trying to verify that a
particular collaboration was made inside a transaction. My general
strategy was to start off using something like Transaction.stub!
(:execute).and_yield in a
I just got bitten by a strange issue with rspec-1.1.11 and jruby
1.1.3-1.1.6RC1. I'd love to know what the problem was if anyone has
any ideas. It's almost as if, rspec didn't like something about this
particular class since substituting others worked fine. It does work
with Rspec edge so I
On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote:
I contributed an article on BDD and RSpec to the Ruby Advent Calendar
2008, going over some of the rules I've collected for interpreting
what your specs say about your design. It can be found here:
http://advent2008.hackruby.com/past/2008/12/10/
On Dec 16, 2008, at 3:58 PM, Ben Mabey wrote:
Lenny Marks wrote:
On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote:
I contributed an article on BDD and RSpec to the Ruby Advent
Calendar
2008, going over some of the rules I've collected for interpreting
what your specs say about your d
On Dec 19, 2008, at 12:55 PM, Avdi Grimm wrote:
On Fri, Dec 19, 2008 at 12:02 PM, Lenny Marks wrote:
Thanks to you and Dave for your responses. I've commented on the
original
article with back links to this thread. Hope I didn't overstep by
saying "I
think there is some
Forgive the long post, just looking for input/advice/alternate
opinions..
Like many I think that going through the exercise of framing user
requests in Cucumber terms(Features, Scenarios..) really helps
facilitate necessary conversations and avoid time wasted implementing
the wrong thing(
e, I would use the first style. Later, I
would introduce the aggregate step "Given I have paid a bill with
sufficient funds" as and when I needed to. Like Jonathan said, there
is still the issue of shared state, but arguments can be passed
through the aggregate steps to the imperative steps
ple_group'
[...]/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/
dsl/main.rb:25:in `describe'
[...]
Replacing the above SecurityContextHolder definition with an import:
import 'org.acegisecurity.context.SecurityContextHolder'
fixed the errors. Any expla
I'm curious what other people's thoughts are about when to use
Features vs. Scenarios and how much it matters. I'm getting the sense
that the line is a thin one, and has more to do with complexity/time
to develop than anything else. I had originally enforced a fairly
rigid definition of 'Sc
On Apr 10, 2009, at 12:51 AM, Ben Mabey wrote:
Gavin Hughes wrote:
"Then I should be on /users/3/posts/8/comments/2/edit"
What's the solution for parsing out and matching and arbitrarily deep
nested route?
Hi Gavin,
Let me try to answer your question without actually answering it. :)
I gen
Just tried it out. Something missed?
-lenny
> cat t.rb
describe 'test' do
it "should not fail" do
['A'].should include('A')
end
end
> spec -v
rspec 1.2.4
> spec t.rb
F
1)
NoMethodError in 'test should not fail'
undefined method `helper' for #
t.rb:3:
On Apr 15, 2009, at 10:18 AM,
On Apr 15, 2009, at 11:23 AM, Lenny Marks wrote:
Just tried it out. Something missed?
-lenny
> cat t.rb
describe 'test' do
it "should not fail" do
['A'].should include('A')
end
end
> spec -v
rspec 1.2.4
> spec t.rb
F
1)
NoMetho
I've been doing something similar. I think the benefit of having half
the steps(each can be negated) wins over the small impact it has on
step readability. Personally I started adding stuff like this(perhaps
not as DRY but simple enough):
Then /^the correspondence should (not )?have inclusi
On Apr 18, 2009, at 1:17 PM, Fernando Perez wrote:
Hi,
Let's take the example of the depot app. In my controller I set
@order.
Then in the view comes the bad stuff:
@order.items.each do |item|
item.product.title
end
Now I'm having problems specing item.product.title. A quick and dirty
fi
On Apr 21, 2009, at 9:45 AM, Steve Schafer wrote:
On Mon, 20 Apr 2009 12:40:08 -0700, you wrote:
I wrote a blog post that may be helpful.
http://www.patmaddox.com/blog/demeter-is-for-encapsulation
Basically,
when you have structural objects as in this case, demeter isn't
useful.
I agree
jruby-1.3.0
rspec/rspec-rails 1.2.6
I just ran into the 'Missing template' thing from the ticket below as
well. Is it really that uncommon for a controller action to redirect
or explicitly render a different template? Is it still considered
'invalid'? Seems silly to have to create a bunch o
38 matches
Mail list logo