Sha256: caa224c43d121dedba6a9d06a66c944783745c335b53806cdba63b2600473a86

Contents?: true

Size: 734 Bytes

Versions: 18

Compression:

Stored size: 734 Bytes

Contents

fixture.preload("fixture.html", "fixture.json") # make the actual requests for the files
describe "Using fixtures", ->

  fixture.set("<h2>Another Title</h2>") # create some markup manually (will be in a beforeEach)

  beforeEach ->
    @fixtures = fixture.load("fixture.html", "fixture.json", true) # append these fixtures

  it "loads fixtures", ->
    expect($("h1", fixture.el).text()).toBe("Title") # using fixture.el as a jquery scope
    expect($("h2", fixture.el).text()).toBe("Another Title")
    expect(@fixtures[0]).toBe(fixture.el) # the element is available as a return value and through fixture.el
    expect(@fixtures[1]).toEqual(fixture.json[0]) # the json for json fixtures is returned, and available in fixture.json

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
teaspoon-0.9.1 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.9.0 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.8.0 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.9 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.8 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.7 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.6 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.5 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teaspoon-0.7.4 spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee
teabag-0.7.3 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.7.2 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.7.1 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.7.0 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.6.0 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.5.5 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.5.4 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.5.3 spec/javascripts/teabag/jasmine/fixture_jspec.coffee
teabag-0.5.2 spec/javascripts/teabag/jasmine/fixture_jspec.coffee