Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Commit

Permalink
added checkbox to QUnit to set recording parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Malan committed Jan 24, 2015
1 parent fc9e5a6 commit 621b8fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ insertCassette(cassette);

## Creating a recording

* in /tests add the parameter "record=true" eg /tests?record=true
* in a QUnit test click on the "Record API Queries checkbox
* when the tests are finished a file will automatically be downloaded
* replace the current cassette.js in tests/helpers with the new cassette.js

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-cli-betamax",
"version": "0.1.0",
"description": "Allows for the recording and playback of API responses. - probably not fit for general consumption yet",
"version": "0.1.1",
"description": "Allows for the recording and playback of API responses, Sort of like Rails VCR, but for Ember CLI",
"directories": {
"doc": "doc",
"test": "tests"
Expand Down
7 changes: 7 additions & 0 deletions test-support/helpers/insert-cassette.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import betamaxRecorder from './betamax-recorder';

export default function(cassette){

QUnit.config.urlConfig.push({
id: 'record',
value: 'true',
label: 'record API Queries',
tooltip: 'Allow for live API querying and save the results'
});

QUnit.begin(function(){
startServer();
//if record is not selected, use recordings
Expand Down

0 comments on commit 621b8fe

Please sign in to comment.