Sha256: 64caeb15c8ca7c942dc259e667cca6d62d081d6f84af5c979c2c689ddb8b5f2f

Contents?: true

Size: 903 Bytes

Versions: 11

Compression:

Stored size: 903 Bytes

Contents

require 'rails_helper'

describe "budget_types/index" do
  before(:each) do
    assign(:budget_types, [
      stub_model(BudgetType,
        :name => "public_funds",
        :display_name => "Public funds",
        :note => "MyText",
        :position => 1
      ),
      stub_model(BudgetType,
        :name => "donation",
        :display_name => "Donation",
        :note => "MyText",
        :position => 2
      )
    ])
  end

  it "renders a list of budget_types" do
    allow(view).to receive(:policy).and_return double(create?: true, update?: true, destroy?: true)
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Public funds".to_s, :count => 1
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => "MyText".to_s, :count => 2
  end
end

Version data entries

11 entries across 9 versions & 2 rubygems

Version Path
enju_library-0.2.5 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.4 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.3 spec/views/budget_types/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/spec/views/budget_types/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/spec/views/budget_types/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.2 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.1 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.0 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.0.beta.10 spec/views/budget_types/index.html.erb_spec.rb
enju_library-0.2.0.beta.9 spec/views/budget_types/index.html.erb_spec.rb