On Sat, Oct 18, 2008 at 2:44 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-10-17, at 17:16, David Chelimsky wrote:
>>
>> Cool. Don't forget the seldom used #head, though I don't know what to
>> call it: when_heading_to?
>
> I looked through the docs at http://rspec.rubyforge.org/rspec/1.1.8
On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec
test to validate this HTML. I can of cause use regex to validate it
as a string, but would much rat
On Oct 18, 2008, at 2:45 AM, aslak hellesoy wrote:
On Sat, Oct 18, 2008 at 2:34 AM, William Tozier <[EMAIL PROTECTED]
> wrote:
* I need a Rakefile... but with what exactly in it? Many of the
examples are
different, and at least a few fail to run on my box (but that's
external
dependencies).
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec test
to validate this HTML. I can of cause use regex to validate it as a
string, but would much rather validate it by traversing the DOM and
checking that t
Scott Taylor <[EMAIL PROTECTED]> writes:
> On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
>
>> Hi
>>
>> I'm using RSpec in with Ruby on Rails. I've made a helper module
>> method that generates some HTML and would like to create a rspec
>> test to validate this HTML. I can of cause use re
Scott Taylor <[EMAIL PROTECTED]> writes:
> As for #3, I'm
> pretty sure that Ruby's method_missing allows one to raise an
> exception easily. Not sure what a Javascript mocking framework would
> do in this case.
I'm not sure that I buy that this feature is very important. Both
Javascript and Ru
juuuser <[EMAIL PROTECTED]> writes:
> Hello.
>
> Sorry for this little offtopic question, but I was wondering if anyone
> happens to know if there's any good conferences coming up about rspec or
> ruby or watir in this year where I could attend to?
>
> Or any good website where such things are lis
On Sat, Oct 18, 2008 at 12:53 AM, Scott Taylor
<[EMAIL PROTECTED]> wrote:
>
> In Javascript, it might look more or less like this:
>
> var old_method = obj[my_method];
> my_obj[my_method] = my_return_value;
That's an interesting syntax comparison, thanks, but not really what I
was reacting to. Th
On 2008-10-18, at 09:16, Pat Maddox wrote:
Scott Taylor <[EMAIL PROTECTED]> writes:
You'd be able to write a spec like the following:
it "should link with the correct name" do
helper.should_receive(:link_to).with("foo", {:controller => "foo",
:action => "foo"})
helper.my_method("foo")
end
On Sat, Oct 18, 2008 at 6:16 AM, Pat Maddox <[EMAIL PROTECTED]> wrote:
> Does have_tag work with plain strings
>
Yep, it does. That's how I spec #to_amcharts. :)
///ark
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailma
Hi,
I am trying to code an application that is based on Rspec; I am
programmatically building examples, and launching the runner with a custom
formatter. Here are the code snippets from my app:
Launching the runner:
example_groups =
test_expectation.example_groups_for(system_stat
On Sat, Oct 18, 2008 at 11:34 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-10-18, at 09:16, Pat Maddox wrote:
>>
>> Scott Taylor <[EMAIL PROTECTED]> writes:
>>>
>>> You'd be able to write a spec like the following:
>>>
>>> it "should link with the correct name" do
>>> helper.should_receiv
On Sat, Oct 18, 2008 at 2:13 PM, Jake Benilov <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to code an application that is based on Rspec; I am
> programmatically building examples, and launching the runner with a custom
> formatter. Here are the code snippets from my app:
>
> Launching the runn
Writing feature inputs in the tabular format has recently been very
helpful. However, there are some things that seem kind of funny when
writing. For example, let's say we wanted to ensure that certain
requests resulted in the access denied page:
Given Joe is a staff member without the 'admin' p
Zach Dennis wrote:
Writing feature inputs in the tabular format has recently been very
helpful. However, there are some things that seem kind of funny when
writing. For example, let's say we wanted to ensure that certain
requests resulted in the access denied page:
Given Joe is a staff member
Stephen Eley wrote:
> On Fri, Oct 17, 2008 at 3:28 PM, Rasmus Rasmussen <[EMAIL PROTECTED]>
> wrote:
>>
>> this feels like a duplication. If I write rspec-tests I should not do
>> ordinary tests, because then I need to maintain two fixtures. Right?
>
> Correct. You don't need it. But the standa
On Oct 18, 2008, at 9:16 AM, Pat Maddox wrote:
Scott Taylor <[EMAIL PROTECTED]> writes:
On Oct 18, 2008, at 4:40 AM, Thomas Watson Steen wrote:
Hi
I'm using RSpec in with Ruby on Rails. I've made a helper module
method that generates some HTML and would like to create a rspec
test to valid
Hi all;
I'm getting a weird error from the rspec gem when using rake to load
fixtures in rails:
% rake db:fixtures:load RAILS_ENV=test
/path/to/Ruby/Gems/1.8/gems/rspec-1.1.8/lib/spec/runner/options.rb:
229:in `files_to_load': File or directory not found: db:fixtures:load
(RuntimeError)
f
On Oct 18, 2008, at 9:19 AM, Pat Maddox wrote:
Scott Taylor <[EMAIL PROTECTED]> writes:
As for #3, I'm
pretty sure that Ruby's method_missing allows one to raise an
exception easily. Not sure what a Javascript mocking framework would
do in this case.
I'm not sure that I buy that this featu
On Sat, Oct 18, 2008 at 2:13 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>
> Given Joe is a staff member without the '$privilege$' privilege
> When I $request$ $path$ as Joe
> Then I am notified that access was denied
My only beef with this is that it breaks the pattern of writing
scenarios in p
Hi All
I've just started experimenting with Cucumber and its great.
However I wasn't quite sure how I should integrate it into my Rails
application.
What I would like to do is set my Rails app up so that I can run a
Cucumber rake task using the standard Rails Rake system.
I've looked through the
On Sat, Oct 18, 2008 at 4:25 PM, Stephen Eley <[EMAIL PROTECTED]> wrote:
> On Sat, Oct 18, 2008 at 2:13 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>>
>> Given Joe is a staff member without the '$privilege$' privilege
>> When I $request$ $path$ as Joe
>> Then I am notified that access was denied
On Sat, Oct 18, 2008 at 10:25 PM, Stephen Eley <[EMAIL PROTECTED]> wrote:
> On Sat, Oct 18, 2008 at 2:13 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>>
>> Given Joe is a staff member without the '$privilege$' privilege
>> When I $request$ $path$ as Joe
>> Then I am notified that access was denied
On Oct 18, 2008, at 9:51 pm, Zach Dennis wrote:
Given I login as Joe without the 'admin' privilege
When I GET /admin
Then I am notified that access was denied
More Examples:
| name | privilege | request_method | path| name |
| Joe | admin | POST | /invoices | Joe |
|
Hi,
I'm new to rspec and working on catching up my app with rspec testing.
I'm running OSX 10.5.5 with Rails 2.1.0 and Rspec 1.1.8.
Most things I've tried work except loading fixtures. I setup a describe
block for the model as
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
On Sat, Oct 18, 2008 at 10:33 PM, Ben Emson <[EMAIL PROTECTED]> wrote:
> Hi All
>
> I've just started experimenting with Cucumber and its great.
> However I wasn't quite sure how I should integrate it into my Rails
> application.
>
Have you read this?
http://github.com/aslakhellesoy/cucumber/wikis
David,
Thanks for your reply; however I probably wasn't very clear in my
explanation. What I am really trying to do is to create a builder for
example group objects, without automatically adding the example groups to
the rspec runner when the builder code is invoked.
As an example, when I call th
On Sat, Oct 18, 2008 at 6:34 PM, Jake Benilov <[EMAIL PROTECTED]> wrote:
> David,
>
> Thanks for your reply; however I probably wasn't very clear in my
> explanation. What I am really trying to do is to create a builder for
> example group objects, without automatically adding the example groups to
Stephen Eley wrote:
On Fri, Oct 17, 2008 at 2:55 PM, Mark Thomson <[EMAIL PROTECTED]> wrote:
and then check that the expected messages are being received -
file.should_receive(:puts).with("a string").once
file.should_receive(:puts).with("another string").once
Here's what I'm puzzled about. I
On Sat, Oct 18, 2008 at 9:49 PM, Mark Thomson <[EMAIL PROTECTED]> wrote:
>
> [...] What I've observed is that it behaves differently
> if I include a "should_not_receive('...')" expectation somewhere in the
> spec. In that case it seems that I can have as many "file.puts()" in the
> component bein
On Oct 18, 2008, at 10:50 am, Scott Taylor wrote:
No - that's not really an option. The rails stack has no idea about
a DOM.
One option, though, is to stub methods and use message
expectations. For instance, if you had a helper like the following:
Hi Scott
Another option would be Hpr
Ben Mabey <[EMAIL PROTECTED]> writes:
> Pat has been working on adding the spy pattern to rspec
I quit once I found not_a_mock [1] which works nicely. My preference
would be to pull spies into RSpec eventually, but I want to use it a bit
more first (and hopefully others will too).
Pat
[1] htt
To run all features you can run:
rake features
To run specific features you can do something like:
script/cucumber --require features/steps features/path/to/my.feature
If you want to run a particular scenario find out the line number of
the first Given and run:
script/cucumber --line 41
On Oct 18, 2008, at 10:30 AM, Stephen Eley wrote:
On Sat, Oct 18, 2008 at 12:53 AM, Scott Taylor
<[EMAIL PROTECTED]> wrote:
In Javascript, it might look more or less like this:
var old_method = obj[my_method];
my_obj[my_method] = my_return_value;
That's an interesting syntax comparison, th
On Sat, Oct 18, 2008 at 6:10 PM, Harry Bishop <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm new to rspec and working on catching up my app with rspec testing.
> I'm running OSX 10.5.5 with Rails 2.1.0 and Rspec 1.1.8.
> Most things I've tried work except loading fixtures. I setup a describe
> block for
I'm top posting... I wish I could inline post, but you provided a lot
of generalizations for how you think things are working on your code,
but you don't actually post concrete code (the should_receive and
should_not_receive case you mentioned that wasn't acting like you'd
expect). Perhaps this wil
On Sat, Oct 18, 2008 at 5:42 PM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
>
> On Oct 18, 2008, at 9:51 pm, Zach Dennis wrote:
>
>> Given I login as Joe without the 'admin' privilege
>> When I GET /admin
>> Then I am notified that access was denied
>>
>> More Examples:
>> | name | privilege | request
(I just realized that Zach was doing some sort of reply-all that
included my address separately, and had my reply going to him instead
of the list. So I'm sending it to the list now as I originally
intended.)
On Sat, Oct 18, 2008 at 4:51 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>
> I don't kno
On Sat, Oct 18, 2008 at 7:37 PM, Stephen Eley <[EMAIL PROTECTED]> wrote:
> On Sat, Oct 18, 2008 at 4:51 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>>
>> I don't know if it damages the scenario as a whole. After all, the
>> reason you're using tabular data in the first place is so you can
>> re-use
Ben Mabey wrote:
>
> As far as your suggestion about using placeholders instead of a real
> example set- I like it. This was actually brought up a little while ago
> by Evan Light on this list so I think it is something that people
> naturally move towards.
As Ben said this has cropped up i
Stephen Eley wrote:
On Sat, Oct 18, 2008 at 9:49 PM, Mark Thomson <[EMAIL PROTECTED]> wrote:
[...] What I've observed is that it behaves differently
if I include a "should_not_receive('...')" expectation somewhere in the
spec. In that case it seems that I can have as many "file.puts()" in th
Zach Dennis wrote:
I'm top posting... I wish I could inline post, but you provided a lot
of generalizations for how you think things are working on your code,
but you don't actually post concrete code (the should_receive and
should_not_receive case you mentioned that wasn't acting like you'd
exp
42 matches
Mail list logo