Sha256: a1d696823643f1ca3f242537a4b65bc1d63ad6c3654d42c3b87c6eb4baba47da

Contents?: true

Size: 762 Bytes

Versions: 8

Compression:

Stored size: 762 Bytes

Contents

require 'helper'
require 'generators/presenter/presenter_generator'

class PresenterGeneratorTest < GeneratorCase
  tests PresenterGenerator

  test "create presenter" do
    run_generator %w(test)
    
    assert_file "app/presenters/test_presenter.rb" do |presenter|
      assert_match(/class TestPresenter < Presenter/, presenter)
      assert_match(/def initialize\(test\)/, presenter)
      assert_match(/@test = test/, presenter)
    end

  end

  test "create presenter test" do 
    run_generator %w(test)
    
    assert_file "test/presenters/test_presenter_test.rb" do |presenter_test|
      assert_match(/require 'test_helper'/, presenter_test)
      assert_match(/class TestPresenterTest < ActiveSupport::TestCase/, presenter_test)
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
neo-rails-0.4.1 test/generator/presenter_generator_test.rb
neo-rails-0.4.0 test/generator/presenter_generator_test.rb
neo-rails-0.3.2 test/generator/presenter_generator_test.rb
neo-rails-0.3.1 test/generator/presenter_generator_test.rb
neo-rails-0.3 test/generator/presenter_generator_test.rb
neo-rails-0.2.3.1 test/generator/presenter_generator_test.rb
neo-rails-0.2.3 test/generator/presenter_generator_test.rb
neo-rails-0.2.2 test/generator/presenter_generator_test.rb