Sha256: 96bebdc6a34407a02cad0b34fafa5c0a96ecf7c987bb67cf6485966c9f43472e

Contents?: true

Size: 905 Bytes

Versions: 8

Compression:

Stored size: 905 Bytes

Contents

require 'spec_helper'

feature Netzke::TestingController do
  it 'renders Netzke components specified in the URL' do
    visit '/netzke/components/Foo'
    page.should have_selector "#foo-netzke"
  end

  it 'includes custom js into page' do
    visit '/netzke/components/Foo?spec=true'
    page.html.should include '<script src="/assets/custom.js"'
  end

  it 'includes JS helpers' do
    visit '/netzke/components/Foo?spec=true'
    page.html.should include 'assets/netzke/testing/helpers/queries'
  end

  it 'does not include JS helpers when no spec is specified' do
    visit '/netzke/components/Foo'
    page.html.should_not include 'assets/netzke/testing/helpers/queries'
  end

  it 'does not include JS helpers when no-helper param is set to true' do
    visit '/netzke/components/Foo?no-helpers=true&spec=true'
    page.html.should_not include 'assets/netzke/testing/helpers/queries'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
netzke-testing-0.11.2 spec/testing_controller_spec.rb
netzke-testing-0.12.1 spec/testing_controller_spec.rb
netzke-testing-0.12.0 spec/testing_controller_spec.rb
netzke-testing-0.12.0.beta2 spec/testing_controller_spec.rb
netzke-testing-0.12.0.beta spec/testing_controller_spec.rb
netzke-testing-0.11.1 spec/testing_controller_spec.rb
netzke-testing-0.10.0 spec/testing_controller_spec.rb
netzke-testing-0.10.0.rc1 spec/testing_controller_spec.rb