Sha256: ececefeb7668debc9cd0a42b04a2b7c875c5f663c65bf6db2d571a1ee42b6aee

Contents?: true

Size: 457 Bytes

Versions: 19

Compression:

Stored size: 457 Bytes

Contents

require 'rails_helper'

describe TestController do
  render_views

  let(:name) { "name" }

  subject { get :javascript_bindings, { name: name }}

  it "renders the view with the correct bindings" do
    model_name = "TestModel_1"
    attr_binding = "#{model_name}.name"

    model_match = subject.body.scan(model_name)
    attr_match = subject.body.scan(attr_binding)

    expect(model_match.count).to eq(5)
    expect(attr_match.count).to eq(4)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
angular_sprinkles-0.3.3 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.3.2 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.3.1 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.3.0 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.14 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.13 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.12 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.11 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.10 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.9 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.8 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.7 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.6 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.5 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.4 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.3 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.2 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.1 spec/controllers/test_controller_spec.rb
angular_sprinkles-0.2.0 spec/controllers/test_controller_spec.rb