Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

phantomjs runner executes my tests twice #28

@jerodsanto

Description

@jerodsanto

I'm on Rails 3.2.13 and using the asset pipeline. My jasmine.yml looks like this:

spec_files:
  - "**/*[Ss]pec.{js,coffee}"

I am testing an Angular controller that looks like this:

//= require angular
//= require angular-mocks
//= require application/app
//= require application/controllers/nav_ctrl

describe("NavCtrl", function() {
  // ... snip ...
})

(the reason for the 'application' directory inside 'javascripts/assets' is because there are more than one Angular apps in the Rails app)

When I run rake spec:javascript the phantomjs runner executes my "NavCtrl" tests twice.

I noticed that the generated spec/tmp/runner.html has a script tag for each of my dependencies and my spec files and it also includes a jasmine-specs.js file which appears to be all of the dependencies and spec files concatenated into a single file.

When I visit /specs in my app everything works okay (runs once) and the included jasmine-specs.js file is empty.

Any ideas what could be going on?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions