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

Phoenix #70

Open
wants to merge 5 commits into
base: phoenix
Choose a base branch
from
Open

Phoenix #70

wants to merge 5 commits into from

Conversation

searls
Copy link

@searls searls commented Feb 24, 2012

Just wanted to share a different take on this jasmine spec that came to mind when you graciously tweeted it.

A few aspects:

  1. Uses the *-given DSL, which I think helps encourage denser specs, since each activity really wants to fit in one line (and yet still make sense). This only looks clean in CoffeeScript, however, so...
  2. I rewrote the spec CoffeeScript.Note that you'd definitely would want to pause before merging, since this will probably not work with the official jasmine gem as you have it configured. But good news, because...
  3. To resolve that, I pulled in @johnbintz's excellent jasmine-headless-webkit, which includes CoffeeScript compilation and works from the existing jasmine.yml config. It also buys you...
  4. guard support! So you can run bundle exec guard and your specs will re-run on file change; when you change just a spec file, only that spec will run.

I sure threw a bunch at you just to rewrite one lousy spec, but if you're interested, I'd happily help convert all of the existing specs over. :-)

specs headlessly (shares the jasmine.yml config
used by the official jasmine gem).

To run it, just run:

bundle exec jasmine-headless-webkit

Goes great with guard, as well.
I replaced the boolean flag with a spy and set
an expectation on the args.
Can now run jasmine tests as files are changed:

`bundle exec guard`
script, using the jasmine-given DSL
@mxriverlynn
Copy link
Owner

other than the CS - which I just can seem to like, for whatever reason - i like the changes. i've known about the headless webkit and i use guard for a lot of other projects... just can't be bothered to set those up most of the time :P

i wasn't aware of jasmine-given, though. definitely going to start using that. i'd been thinking about wanting something like that, but hadn't bothered to look in to it.

@searls
Copy link
Author

searls commented Feb 24, 2012

Awesome! I'll try to keep an eye on your repo as I have time. Let me
know if you run into any issues.

I also have jasmine-headless-webkit running on travis-ci on most of my
projects, so you could

check out an example .travis-yml:

https://github.com/searls/jasmine-fixture/blob/master/.travis.yml

On Feb 24, 2012, at 7:47, Derick Bailey
reply@reply.github.com
wrote:

other than the CS - which I just can seem to like, for whatever reason - i like the changes. i've known about the headless webkit and i use guard for a lot of other projects... just can't be bothered to set those up most of the time :P

i wasn't aware of jasmine-given, though. definitely going to start using that. i'd been thinking about wanting something like that, but hadn't bothered to look in to it.


Reply to this email directly or view it on GitHub:
#70 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants