Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cucumber features not working #30

Closed
kbaum opened this issue Feb 5, 2010 · 4 comments
Closed

cucumber features not working #30

kbaum opened this issue Feb 5, 2010 · 4 comments

Comments

@kbaum
Copy link

kbaum commented Feb 5, 2010

Tried running the cucumber feature in the mail project, but it had some issues.

eature: Making a new message
In order to to be able to send a message
Users should be able to
Create a message object

Scenario: Making a basic plain text email from a string # spec/features/making_a_new_message.feature:6
Given a basic email in a string # spec/features/steps/making_a_new_message_steps.rb:1
When I parse the basic email # spec/features/steps/making_a_new_message_steps.rb:5
uninitialized constant Mail::Message (NameError)
./spec/features/steps/../../../lib/mail/mail.rb:50:in new' ./spec/features/steps/making_a_new_message_steps.rb:6:in/^I parse the basic email$/'
spec/features/making_a_new_message.feature:8:in `When I parse the basic email'
Then the 'from' field should be 'bob' # spec/features/steps/making_a_new_message_steps.rb:9
| attribute | value |
| to | mikel |
| subject | Hello! |
| body | email message |

Failing Scenarios:
cucumber spec/features/making_a_new_message.feature:6 # Scenario: Making a basic plain text email from a string

1 scenario (1 failed)
3 steps (1 failed, 1 skipped, 1 passed)
0m0.006s
rake aborted!
Command failed with status (1): [/usr/local/rvm/ruby-1.8.6-p287/bin/ruby -I...]

Do you plan on using cucumber for some of your testing. Was thinking of trying to implement some imap functionality and i was going to start with cucumber.

thx.

-karl

@mikel
Copy link
Owner

mikel commented Feb 5, 2010

Hi Karl,

I started with Cucumber in Mail, but it didn't seem to fit very well, as Mail is a very low level library.

I haven't run the cucumber scenarios for months, that's why they don't work.

If you can get them working, fantastic, go for it.

Otherwise, make an rspec networks/delivery_agents/imap spec file and go from there.

Mikel

@kbaum
Copy link
Author

kbaum commented Feb 6, 2010

I had an experience trying to rspec an imap implementation and mocking out all of the ruby imap method calls proved to be a pain and I wasn't quite sure it was an effective way of testing. I ended up creating some high level cucumber features that connected to a real test email account. This was also not that ideal because of the slowness and lack of isolation from the imap server. In the end though, it was the most effective way for me to feel comfortable that my code was still working.

What's your thoughts in how to best write tests for the imap implementation? Do you think connecting to some test imap accounts on gmail from cucumber makes sense? Is there a better way to mock out calls in the imap library?

thx.

-karl

@kbaum
Copy link
Author

kbaum commented Feb 7, 2010

We will stub out the ruby imap library then (We talked offline).

thx

@mikel
Copy link
Owner

mikel commented Feb 16, 2010

ok

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants