A Pivot was bothered by the occasionally stale state of Jasmine .html fixtures. If you’re following a workflow similar to the recent Jasmine Railscast then your fixture files will undoubtable deviate from the ‘reality’ of your application. JB posted a solution that address the issue of quickly generating and loading .html fixture files, but this Pivot’s concern was having to manually kick off that process. It seems like watchr would be a good tool to monitor app/views and call one’s fixture generation process.
encoding of regular expressions in 1.9
Executing regular expressions over input of unknown encodings has caused headaches for people using Ruby 1.9. When the encoding of the regex and input differ Ruby throws an
Encoding::CompatibilityError. The only solution we’ve seen is to change the encoding of either the input or expression to match the other, as seen here.
Does anyone know of a double ledger accounting gem?
Ask for Help
“Anyone using Selenium 2 and Webdriver?”
One of our internal projects is using it.
“How to stop time in Jasmine?”
There were a couple suggestions:
- use a global function, such as ‘now’
- send in your own clock object
“Whurl standalone, or more dynos?”
Apparently Whurl is running on a single dyno at Heroku, so a single bad request can tie up Whurl until the request times out. Where are you TildeWill?
“What’s this called?”
Imagin these are records in a relational database, with the records on the left having a one to many relationship with the records on the right. How would you google this?
Jasmine bundled with RubyRacer
Jasmine is now optionally bundled with the RubyRacer gem. This lets you run Jasmine tests through Google’s V8 engine in a browser-less environment. Similarly, some Pivots paired Jasmine with Johnson and env.js to produce JazzMoney. Right now, JazzMoney is the only headless testing tool for Ruby that has DOM support, but I’m sure RubyRacer has that in mind. You can find JazzMoney here.
Does anyone know how to run specs with a certain name? We’re using RSpec to generate fixtures for our Jasmine tests and want those to be updated right before we run our Jasmine task.
You can set SPEC_OPTS with the ‘e’ flag and give it a string to match test names. Something like this:
rake spec SPEC_OPTS='-e "should generate a fixture"'