Zach Dennis wrote:
> response.should
> have_tag("input[type=radio][checked=checked][name=?][valued=?]",
> "your[button]", "foo")
Wouldn't that require me to do this: My label
My validator is saying that is not valid XHTML.
Thanks for the suggestion. I definitely haven't looked into the power of
On Tue, Nov 25, 2008 at 11:16 PM, Pau Cor <[EMAIL PROTECTED]> wrote:
> Hi. I'm trying to write a matcher to make sure a radio button is
> selected when the page loads.
>
> I got this at the moment:
>
> When /^I leave "(.*)" selected$/ do |label|
> field = field_labeled label
> unless field.instan
On Tue, Nov 25, 2008 at 6:09 PM, Tim Walker <[EMAIL PROTECTED]> wrote:
> Since Cucumber is about BDD and defining the "acceptable and desired
> behavior" of the software through plain english (executable
> requirements if you will) it is not always clear what "level" the
> steps will implement.
>
>
On 2008-11-25, at 22:07, David Parker wrote:
Hello!
So I'm having some problems working out some probably really easy
associations in Rails. I've Googled around and read some things on
different Rails forums and blogs, but I just haven't seen many solid
examples.
Anyway, my question is
Hi. I'm trying to write a matcher to make sure a radio button is
selected when the page loads.
I got this at the moment:
When /^I leave "(.*)" selected$/ do |label|
field = field_labeled label
unless field.instance_variable_get("@element")['checked'] &&
field.instance_variable_get("@element")
hi Parker, maybe it is not an association mock problem. I view your code
and I think you need to correct one place
@account.stub!(:articles).and_return(@article)
#=>
@account.stub!(:article).and_return(@article)
--
Posted via http://www.ruby-forum.com/.
So playing around with things, it appears I didn't remember to put in the
and_return(@article)... so I changed my before to look something like this:
describe "handling POST /accounts/article" do
before(:each) do
@article = mock_model(Article, :to_param => '1')
@account = mock_
I think it is a common test case you would meet. For example, you want
to test a user registry scenario. You write:
Scenario: User Registry
When I dosth
Then I dosth
...
And now business has some changes. Register should have to activate his
account by a secret code sent by mobile phone.
Hello!
So I'm having some problems working out some probably really easy
associations in Rails. I've Googled around and read some things on
different Rails forums and blogs, but I just haven't seen many solid
examples.
Anyway, my question is a basic "how do I use RSpec with stubs/mocks through
a
Someone has been working on it:
http://deaddeadgood.com/2008/10/8/scaffolding-nested-resources-in-rails
http://github.com/phorsfall/rspec_on_rails_nested_scaffold/tree/master
This works for me on rails 2.2.2 and the latest rspec-rails (1.1.11.1)
On Wed, Dec 19, 2007 at 12:04 PM, David Chelimsky
Since Cucumber is about BDD and defining the "acceptable and desired
behavior" of the software through plain english (executable
requirements if you will) it is not always clear what "level" the
steps will implement.
In the case of Rails testing out of the box this maps roughly to:
1) unit tests -
James Byrne <[EMAIL PROTECTED]> writes:
> Ben Mabey wrote:
>
>> Right. Although, I'm unsure if rspec is even the default framework
>> outside of the rails generators.
>> -Ben
>
> Where can one get a handy quick reference of what syntax is acceptable
> to cucumber by default?
Ruby syntax is acce
On Nov 25, 2008, at 12:34 PM, Peter Jaros wrote:
On Tue, Nov 25, 2008 at 2:04 PM, s.ross <[EMAIL PROTECTED]> wrote:
In Rails, the primary key, by default 'id', is used all over the
place. However, Ruby now deprecates the use of constructs like:
@post = Post.find(:first)
@post_id = @post.id
I
"s.ross" <[EMAIL PROTECTED]> writes:
> In Rails, the primary key, by default 'id', is used all over the
> place. However, Ruby now deprecates the use of constructs like:
>
> @post = Post.find(:first)
> @post_id = @post.id
>
> I buy the rationale, as the Object#id is something of a reserved
> metho
On Tue, Nov 25, 2008 at 2:21 PM, Rick DeNatale <[EMAIL PROTECTED]>wrote:
>
> 'undefined method describe' error.
>
This has nothing to do with your problem, but I thought it was kind of
funny. I was working on a little non-Rails project myself, and got the
'undefined method describe' error with th
On Tue, Nov 25, 2008 at 9:54 PM, James Byrne <[EMAIL PROTECTED]> wrote:
> Aslak Hellesøy wrote:
>
> >>
> >> Cucumber depends upon RSpec.
> >
> > No it doesn't
> >
> > Aslak
>
> Forgive my misapprehension.
Sorry - I should never email from my iPhone.
What I meant is that Cucumber itself does not
For some reason, autospec has stopped working on one of my pure ruby
projects.
I'm not sure whether or not this was before of after I updated to RSpec
1.1.11.
Spec's which run fine using the textmate rspec bundle's runner fail with
autospec, with a 'undefined method describe' error.
I'm sure tha
James Byrne wrote:
Ben Mabey wrote:
Right. Although, I'm unsure if rspec is even the default framework
outside of the rails generators.
-Ben
Where can one get a handy quick reference of what syntax is acceptable
to cucumber by default?
Hmm.. I'm not sure what you mean but the cu
Ben Mabey wrote:
> Right. Although, I'm unsure if rspec is even the default framework
> outside of the rails generators.
> -Ben
Where can one get a handy quick reference of what syntax is acceptable
to cucumber by default?
--
Posted via http://www.ruby-forum.com/.
_
James Byrne wrote:
James Byrne wrote:
But, if one wished to incorporate minitest say, then one
would extend the cucumber world
Where does one put this? A the begining of each step_definitions file?
In support/env.rb?
You only need it once- so the env.rb file is fine and natura
James Byrne wrote:
Ben Mabey wrote:
The previous gem releases of cucumber required the rspec gem but as of a
few commits ago that dependency is only there for developing cucumber.
-Ben
I see. So, if I understand correctly, rspec is the "default" testing
framework? But, if one wishe
James Byrne wrote:
> But, if one wished to incorporate minitest say, then one
> would extend the cucumber world
Where does one put this? A the begining of each step_definitions file?
In support/env.rb?
--
Posted via http://www.ruby-forum.com/.
___
Ben Mabey wrote:
>
> The previous gem releases of cucumber required the rspec gem but as of a
> few commits ago that dependency is only there for developing cucumber.
>
> -Ben
I see. So, if I understand correctly, rspec is the "default" testing
framework? But, if one wished to incorporate min
On Tue, Nov 25, 2008 at 4:06 PM, James Byrne <[EMAIL PROTECTED]> wrote:
> James Byrne wrote:
>> Aslak Hellesøy wrote:
>>
Cucumber depends upon RSpec.
>>>
>>> No it doesn't
>>>
>>> Aslak
>>
>> Forgive my misapprehension.
>
> So, where does one find a comprehensive list of expectations for
James Byrne wrote:
> Aslak Hellesøy wrote:
>
>>>
>>> Cucumber depends upon RSpec.
>>
>> No it doesn't
>>
>> Aslak
>
> Forgive my misapprehension.
However, this is what rdoc says:
cucumber 0.1.9 [rdoc] [www] - depends on diff-lcs, hoe, rspec,
term-ansicolor, treetop.
--
Posted via http://
Zach Dennis wrote:
On Tue, Nov 25, 2008 at 4:06 PM, James Byrne <[EMAIL PROTECTED]> wrote:
James Byrne wrote:
Aslak Hellesøy wrote:
Cucumber depends upon RSpec.
No it doesn't
Aslak
Forgive my misapprehension.
So, where does one find a comprehensiv
James Byrne wrote:
> Aslak Hellesøy wrote:
>
>>>
>>> Cucumber depends upon RSpec.
>>
>> No it doesn't
>>
>> Aslak
>
> Forgive my misapprehension.
So, where does one find a comprehensive list of expectations for
cucumber step matchers? Things like:
response.body.should +~ \pattern\
In my ig
Aslak Hellesøy wrote:
>>
>> Cucumber depends upon RSpec.
>
> No it doesn't
>
> Aslak
Forgive my misapprehension.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rs
Tim Walker wrote:
Question: In Cucumber when you're writing code to satisfy steps and
accessing the model objects directly, what support for asserts,
responses, etc.
do people use. (the equivalent of ActionController::TestCase and
ActiveSupport::TestCase), Fixtures, etc.
Cucumber depends u
On 2008-11-25, at 14:04, s.ross wrote:
In Rails, the primary key, by default 'id', is used all over the
place. However, Ruby now deprecates the use of constructs like:
@post = Post.find(:first)
@post_id = @post.id
..snip..
Thanks,
Steve
Hi Steve. Ruby deprecated Object#id in favour of Objec
Tim Walker wrote:
> Question: In Cucumber when you're writing code to satisfy steps and
> accessing the model objects directly, what support for asserts, responses,
> etc.
> do people use. (the equivalent of ActionController::TestCase and
> ActiveSupport::TestCase), Fixtures, etc.
Cucumber depen
On Tue, Nov 25, 2008 at 2:04 PM, s.ross <[EMAIL PROTECTED]> wrote:
> In Rails, the primary key, by default 'id', is used all over the
> place. However, Ruby now deprecates the use of constructs like:
>
> @post = Post.find(:first)
> @post_id = @post.id
I think you've got the wrong end of the stick
On Tue, Nov 25, 2008 at 11:04 AM, s.ross <[EMAIL PROTECTED]> wrote:
> In Rails, the primary key, by default 'id', is used all over the
> place. However, Ruby now deprecates the use of constructs like:
>
> @post = Post.find(:first)
> @post_id = @post.id
>
These are different methods. Object#id is
Question: In Cucumber when you're writing code to satisfy steps and accessing
the model objects directly, what support for asserts, responses, etc.
do people use. (the equivalent of ActionController::TestCase and
ActiveSupport::TestCase), Fixtures, etc.
Thanks,
T
On Tue, Nov 25, 2008 at 12:16 PM
On 25 Nov 2008, at 17:26, Ben Mabey wrote:
David Chelimsky wrote:
On Tue, Nov 25, 2008 at 12:52 AM, Ben Mabey <[EMAIL PROTECTED]> wrote:
Andrew Premdas wrote:
I came across this idea of dropping unit tests for acceptance
tests in
the java world. It didn't like it there and I don't like it
In Rails, the primary key, by default 'id', is used all over the
place. However, Ruby now deprecates the use of constructs like:
@post = Post.find(:first)
@post_id = @post.id
I buy the rationale, as the Object#id is something of a reserved
method. However, changing all references to use [:id], wh
On Tue, Nov 25, 2008 at 10:27 AM, Wes Gamble <[EMAIL PROTECTED]> wrote:
>
> As far as private class methods, could you do
>
> private
> def self.blah
> ...
> end
>
> to get private class methods, or does private not work on class methods in
> this way?
>
You would do
def self.blah
#...
On Nov 25, 2008, at 1:27 PM, Wes Gamble wrote:
Scott Taylor wrote
I'd be interested, however, in hearing about the benefits of
opening the eigenclass to define class methods (apart from ease in
searching, which may be best handled with ctags).
Grouping and private methods.
Potentially
On Nov 25, 2008, at 1:27 PM, Wes Gamble wrote:
Scott Taylor wrote
I'd be interested, however, in hearing about the benefits of
opening the eigenclass to define class methods (apart from ease in
searching, which may be best handled with ctags).
Grouping and private methods.
Potentially
Matt Wynne <[EMAIL PROTECTED]> writes:
> On 25 Nov 2008, at 16:48, Pat Maddox wrote:
>
>> "Zach Dennis" <[EMAIL PROTECTED]> writes:
>>
>>> On Tue, Nov 25, 2008 at 11:08 AM, Mark Wilden <[EMAIL PROTECTED]>
>>> wrote:
On Tue, Nov 25, 2008 at 5:41 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
>
Scott Taylor wrote
I'd be interested, however, in hearing about the benefits of opening
the eigenclass to define class methods (apart from ease in searching,
which may be best handled with ctags).
Grouping and private methods.
Potentially dumb question:
As far as private class methods, cou
On Nov 25, 2008, at 1:14 PM, Mark Wilden wrote:
On Tue, Nov 25, 2008 at 10:04 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
On 25 Nov 2008, at 17:54, Mark Wilden wrote:
On Tue, Nov 25, 2008 at 8:54 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
Surely, as soon as they scroll off the screen, it's
On Tue, Nov 25, 2008 at 10:04 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>
> On 25 Nov 2008, at 17:54, Mark Wilden wrote:
>
> On Tue, Nov 25, 2008 at 8:54 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>>
>> Surely, as soon as they scroll off the screen, it's time to factor that
>> code off into a modu
On 25 Nov 2008, at 17:54, Mark Wilden wrote:
On Tue, Nov 25, 2008 at 8:54 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
Surely, as soon as they scroll off the screen, it's time to factor
that code off into a module or class of its own though?
That's assuming there are a lot of class methods.
On Tue, Nov 25, 2008 at 12:51 PM, Mark Wilden <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 8:34 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>
>>
>> > Nevertheless, I regard the practice as a bit of
>> > an affection - 'look at me, ma, I'm opening the eigenclass!' - or as the
>> > imitation o
On Tue, Nov 25, 2008 at 8:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> Sorry, I know this is off-topic, but I'd really like to know what the
> revered ruby-hackers who read this list think.
>
> See
> http://ozmm.org/posts/class__self_is_harmful.html
For the case of defining class methods I compl
On Tue, Nov 25, 2008 at 8:54 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>
> Surely, as soon as they scroll off the screen, it's time to factor that
> code off into a module or class of its own though?
>
That's assuming there are a lot of class methods. There might be only one,
but if that 'class <
On Tue, Nov 25, 2008 at 8:34 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> > Nevertheless, I regard the practice as a bit of
> > an affection - 'look at me, ma, I'm opening the eigenclass!' - or as the
> > imitation of an affection. It confuses newbies to no purpose, and
> confuses
> > everyone wh
David Chelimsky wrote:
On Tue, Nov 25, 2008 at 12:52 AM, Ben Mabey <[EMAIL PROTECTED]> wrote:
Andrew Premdas wrote:
I came across this idea of dropping unit tests for acceptance tests in
the java world. It didn't like it there and I don't like it here, but
maybe thats because I'm an old
On 25 Nov 2008, at 16:48, Pat Maddox wrote:
"Zach Dennis" <[EMAIL PROTECTED]> writes:
On Tue, Nov 25, 2008 at 11:08 AM, Mark Wilden <[EMAIL PROTECTED]>
wrote:
On Tue, Nov 25, 2008 at 5:41 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
Sorry, I know this is off-topic, but I'd really like to kn
> By default, controller specs don't actually render the views.
Ah. Ok thanks.
/Peter
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
"Zach Dennis" <[EMAIL PROTECTED]> writes:
> On Tue, Nov 25, 2008 at 11:08 AM, Mark Wilden <[EMAIL PROTECTED]> wrote:
>> On Tue, Nov 25, 2008 at 5:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>>>
>>> Sorry, I know this is off-topic, but I'd really like to know what the
>>> revered ruby-hackers who
Thank you. I have the env.rb loading the environment now and am making
progress.
Question:
In Cucumber when you're writing code to satisfy steps and accessing
the model objects directly, what support for asserts, responses, etc.
do people use. (the equivalent of ActionController::TestCase and
Act
On Tue, Nov 25, 2008 at 11:08 AM, Mark Wilden <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 5:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>>
>> Sorry, I know this is off-topic, but I'd really like to know what the
>> revered ruby-hackers who read this list think.
>>
>> See
>> http://ozmm.or
"Peter Ehrenberg" <[EMAIL PROTECTED]> writes:
> I have to spec an contoller action witch is (only) rendering an
> xml.erb template.
> The action looks like this:
>
> def index
> respond_to do |format|
> format.xml
> end
> end
>
> The "index.xml.erb" template includes (for now) on
I have to spec an contoller action witch is (only) rendering an
xml.erb template.
The action looks like this:
def index
respond_to do |format|
format.xml
end
end
The "index.xml.erb" template includes (for now) only the string "XML".
This works fine if I requests the action with
On Tue, Nov 25, 2008 at 5:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> Sorry, I know this is off-topic, but I'd really like to know what the
> revered ruby-hackers who read this list think.
>
> See
> http://ozmm.org/posts/class__self_is_harmful.html
>
> I have adopted class << self, partly from
>> On Tue, Nov 25, 2008 at 9:38 AM, Zach
>> Dennis <[EMAIL PROTECTED]> wrote:
>>> The virtual class of an object (class or instance alike) gives you
>>> the ability to modify the object in ways that a simple class method
>>> usually does not allow.
In particular, when implementing a singleton thi
On Mon, Nov 24, 2008 at 8:34 PM, Raimond Garcia <[EMAIL PROTECTED]> wrote:
>> Wow, if that's it in a nutshell... :)
>>
>> Pat
>
> Thanks Pat, great summary.
>
> I have to admit that I'm as crazy as Yehuda,
> and believe that all we need are just acceptance tests,
> at different layers of abstractio
James Byrne wrote:
> As I work with Rails TestUnit tests I am reconsidering how to use
I discover that in Ruby 1.9 TestUnit is out and minitest is in. I
wonder what effect, if any, this will have on future releases of Rails.
http://www.ruby-forum.com/topic/171625
--
Posted via http://www.ruby-
On Tue, Nov 25, 2008 at 8:39 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 9:38 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
>> On Tue, Nov 25, 2008 at 8:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>>> Sorry, I know this is off-topic, but I'd really like to know what the
>>> r
On Tue, Nov 25, 2008 at 8:13 AM, Tim Walker <[EMAIL PROTECTED]> wrote:
> Thanks very much for this information guys. I got side-tracked with a
> dev issue and hope to have time to work on this this morning. No doubt
> my env.rb is jacked. What part of the install creates that? I see it
> in the do
On Tue, Nov 25, 2008 at 2:52 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>
> On 25 Nov 2008, at 02:23, Andrew Premdas wrote:
>
>> You definitely should have an id for your output. One of the really
>> good things about feature testing is that it helps you identify what
>> needs to be seen in your out
On Tue, Nov 25, 2008 at 12:52 AM, Ben Mabey <[EMAIL PROTECTED]> wrote:
> Andrew Premdas wrote:
>>
>> I came across this idea of dropping unit tests for acceptance tests in
>> the java world. It didn't like it there and I don't like it here, but
>> maybe thats because I'm an old fuddy duddy or somet
On Tue, Nov 25, 2008 at 9:38 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 8:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>> Sorry, I know this is off-topic, but I'd really like to know what the
>> revered ruby-hackers who read this list think.
>>
>> See
>> http://ozmm.org/po
On Tue, Nov 25, 2008 at 8:41 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> Sorry, I know this is off-topic, but I'd really like to know what the
> revered ruby-hackers who read this list think.
>
> See
> http://ozmm.org/posts/class__self_is_harmful.html
>
> I have adopted class << self, partly from r
Typo in last is confusing '
"Should this LIKE in config"
should be...
"Should this LIVE in config".
T
On Tue, Nov 25, 2008 at 7:13 AM, Tim Walker <[EMAIL PROTECTED]> wrote:
> Thanks very much for this information guys. I got side-tracked with a
> dev issue and hope to have time to work on thi
Thanks very much for this information guys. I got side-tracked with a
dev issue and hope to have time to work on this this morning. No doubt
my env.rb is jacked. What part of the install creates that? I see it
in the downloaded project but not in my development project after
installing cucumber. S
Sorry, I know this is off-topic, but I'd really like to know what the
revered ruby-hackers who read this list think.
See
http://ozmm.org/posts/class__self_is_harmful.html
I have adopted class << self, partly from reading RSpec and Cucumber's
code as I learn Ruby. I personally think of class
On Tue, Nov 25, 2008 at 1:23 PM, Alberto Perdomo
<[EMAIL PROTECTED]>wrote:
> Hi all,
>
> i've gotten started with cucumber thanks to Fernando and Raimond who
> gave a brilliant talk about cucumber at the Conferencia Rails in
> Madrid a few weeks ago. Congratulations again guys!
>
> Thanks also to
Hi all,
i've gotten started with cucumber thanks to Fernando and Raimond who
gave a brilliant talk about cucumber at the Conferencia Rails in
Madrid a few weeks ago. Congratulations again guys!
Thanks also to Joseph Wilk who helped me out on IRC getting selenium
up and running!
Well, since then
James Byrne wrote:
> Joseph Wilk wrote:
>>
>> I don't think this is the case. Every Before/After that is in a required
>> file is run before a scenario. So in theory you could create one Before
>> (in for example env.rb) which would get called for all scenarios.
>>
>
> I experimented with the
Hi
In case it's of use to anyone:
http://aviewfromafar.net/2008/11/25/automatically-generate-cucumber-rake-tasks
Handy for me in my current situation (small number feature files, slow-
running).
Ashley
--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
___
On 25 Nov 2008, at 02:23, Andrew Premdas wrote:
You definitely should have an id for your output. One of the really
good things about feature testing is that it helps you identify what
needs to be seen in your output, and by that I don't mean specific
text, but rather a semantic meaning of your
74 matches
Mail list logo