Sha256: ab1ebc4b309e7c234e1920aac0936aa314605fb10e5d1d80e16942c9ec8630fd

Contents?: true

Size: 1.79 KB

Versions: 16

Compression:

Stored size: 1.79 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
    describing_class.must_equal UsersHelperTest
    described_class.must_equal UsersHelper
    self.class.described_class.must_equal UsersHelper
  end
  describe 'level 1' do
    it 'reflects' do
      describing_class.must_equal UsersHelperTest
      described_class.must_equal  UsersHelper
      self.class.described_class.must_equal UsersHelper
    end
    describe 'level 2' do
      it 'reflects' do
        describing_class.must_equal UsersHelperTest
        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

16 entries across 16 versions & 1 rubygems

Version Path
minitest-spec-rails-4.7.11 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.10 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.9 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.8 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.7 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.6 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.5 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.4 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.3 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.2 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.1 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.7.0 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.8 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.7 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.6 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.5 test/dummy_tests/users_helper_test.rb