Sha256: 5a013aef50326e5095ecf25c0792acfdd64395f6cbc1f476d2ea11cbcfcc2b9a

Contents?: true

Size: 1.88 KB

Versions: 3

Compression:

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
minitest-spec-rails-4.3.4 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.3 test/dummy_tests/users_helper_test.rb
minitest-spec-rails-4.3.2 test/dummy_tests/users_helper_test.rb