On Wed, Dec 24, 2008 at 1:32 AM, Matt W. [email protected] wrote:
Is that some kind of trick to create multiple
inheritance?
Not really in that particular case. Ruby modules generally allow you to do
multiple inheritance by ‘mixing in’ behaviour to classes, but that would be
when you use ‘include’ to bring the methods defined in the module into the
class itself.
When you inherit from a class, you inherit both its instance methods and
its
class methods. When you include a module, you (usually) just inherit its
instance methods. The trick under discussion just makes sure you inherit
the
modules “class methods” as well, making it as if you inherited normally.
Is there any way without digging thru source to know which
class include methods from other classes or do y’all just get so cozy
with every Rails class you use that you “just know?”
ancestors tells you a class’s superclasses (including modules).
///ark
I’m new with Ruby and Cucumber. I’ve tried this simple test, but it
didn’t work for me
Given …
When I enter ABC on keyboard
Then …
And here is the ruby code
When /^I enter “([^”]*) on keyboard$/ do |input|
…
end
I always get a complain when executing the test
"You can implement step definitions for undefined steps with there
snippets:
When /^I enter ABC on keyboard$/ do
pending # express the regexp above with the code you wish you had
end
"
And the code above was not executed.
Can anyone tell what I’ve done wrong here?
Thanks.
On Nov 16, 2011, at 11:34 AM, Vin MR wrote:
I’m new with Ruby and Cucumber. I’ve tried this simple test, but it
didn’t work for me
Please send this to the Cucumber mailing list:
http://groups.google.com/group/cukes
Cheers,
David
On Wed, Nov 16, 2011 at 5:34 PM, Vin MR [email protected] wrote:
I’m new with Ruby and Cucumber. I’ve tried this simple test, but it
didn’t work for me
Given …
When I enter ABC on keyboard
Then …
And here is the ruby code
When /^I enter "([^"]*) on keyboard$/ do |input|
That RegExp doesn’t match your step. This will match:
/^I enter (.*) on keyboard$/
Aslak
On Wed, Nov 16, 2011 at 5:45 PM, Chris H. [email protected]
wrote:
this group is for rspec
The Cucumber list → http://groups.google.com/group/cukes