Sha256: 38608dfb1aa7d58823a4027dbfeacd31390133910fc8db0c8f42f3cbdff61190

Contents?: true

Size: 1.65 KB

Versions: 10

Compression:

Stored size: 1.65 KB

Contents

require 'test_helper_dummy'

module UsersHelperTests
  extend ActiveSupport::Concern
  included do

    let(:users_list) { render_users_list User.all }

    before { user_ken }

    it 'works' do
      user_ken
      users_list.must_equal "<ul><li>#{user_ken.email}</li></ul>"
    end

    it 'can find the helper_class' do
      self.class.helper_class.must_equal UsersHelper
    end

    describe 'nested 1' do

      it('works') { skip }

      it 'can find the helper_class' do
        self.class.helper_class.must_equal UsersHelper
      end

      describe 'nested 2' do

        it('works') { skip }

      end

    end
    
  end
end

class UsersHelperTest < ActionView::TestCase
  include UsersHelperTests
  it 'reflects' do
    described_class.must_equal UsersHelper
    self.class.described_class.must_equal UsersHelper
  end
  describe 'level 1' do
    it 'reflects' do
      described_class.must_equal  UsersHelper
      self.class.described_class.must_equal UsersHelper
    end
    describe 'level 2' do
      it 'reflects' do
        described_class.must_equal  UsersHelper
        self.class.described_class.must_equal UsersHelper
      end
    end
  end
end

describe UsersHelper do
  include UsersHelperTests
  it 'reflects' do
    described_class.must_equal UsersHelper
    self.class.described_class.must_equal UsersHelper
  end
  describe 'level 1' do
    it 'reflects' do
      described_class.must_equal UsersHelper
      self.class.described_class.must_equal UsersHelper
    end
    describe 'level 2' do
      it 'reflects' do
        described_class.must_equal UsersHelper
        self.class.described_class.must_equal UsersHelper
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
minitest-spec-rails-5.1.1 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.1.0 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-orangejulius-5.0.5.pre.orangejulius test/dummy_tests/users_helper_test.rb
minitest-spec-rails-orangejulius-5.0.4.pre.orangejulius test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.0.4 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-orangejulius-5.0.3.pre.orangejulius test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.0.3 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.0.2 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.0.1 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-5.0.0 test/dummy_tests/users_helper_test.rb