Posts tagged with cucumber (8)

Jun22 stubbing captchas in cucumber post author

captcha stub cucumber | comments

You use some captcha solution to avoid bots in your site, and you are a good kid and like everything well test-covered. Well, don’t sweat too much with weird solutions to validate your captcha, it’s an external thing you know, it’s pretty ok to stub it.

Continue reading »

Feb12 paperclip attachments testing for the whole battery: RSpec and Cucumber post author

paperclip rspec cucumber | comments

Paperclip is my favourite choice for attachments, and today I needed to spec and cuke my attachments. Even though there are ways to speed your attachments tests I prefer simple, and usable all over. The trick is to create a test attachment and attach it to your models. Continue reading »

Feb04 authlogic avoiding ending up with multiple sessions post author

authlogic session rspec cucumber | comments

Authlogic is cool to handle your authentication. But in my new app the admin user was the one who created new users and updated them also. There I stumbled with a funny gotcha. Admin logged out and there was the user session of the users just created/updated. The thing is authlogic when you save a model that acts a authenticated you got a user session created. The trick is to tell authlogic to save but not creating a session. Continue reading »

Jul30 Bypassing declarative authorization in Cucumber steps post author

cucumber declarative authorization | comments

You have set up that groovy declarative authorization plugin in your app, all the way from models, to controllers and views, to keep authorization tidy and out of the way, and everything runs smoothly. Now when you try to create objects in your features Given steps you face the dreadful not authorized exception:

Continue reading »

Jul09 loading custom rspec matchers into cucumber post author

rspec cucumber matchers | comments

I happen to need to make expectations about a created user on a complex step, so when the chunk started to repeat I make myself an RSpec matcher to do that, and then load it into cucumber to be able to use it in my steps.

Continue reading »

Apr17 Emacs cucumber mode post author

emacs cucumber | comments

Michael Klishin have deviced a cucumber-mode.el mode for Emacs that provides all the sweet syntax hightlights and yasnippets snippets. You clone it or download it, throw it in your elisp/ directory and then adding this to your .emacs you’ll get all the goodies:

Continue reading »

Apr16 Cucumber step negating another expectation step post author

cucumber step | comments

Cucumber is in the opinion of many a kick ass project, and no wonder given all it provides. I’ve being using it in several projects with great joy. Sometimes you need an expectation step to exactly negate another expectation step, generally is not clear what’s the meaning of negate an expectation step, but in boolean expectations it is easy to not them.

Continue reading »

Nov14 Cucumber gotcha en Rails 2.1.0 post author

cucumber generator rails 2.1.0 | comments

Si se usa cucumber como Story Runner en un proyecto Rails 2.1.0 al ejecutar el generador obtendras un warning como el siguiente: Continue reading »