Sha256: e208d5c3d11b192847733d2bc7bfef3069e4712efe44cc66eca9c3ed5caee332

Contents?: true

Size: 591 Bytes

Versions: 33

Compression:

Stored size: 591 Bytes

Contents

require 'test_helper'
require "generators/push_type/structure/structure_generator"

module PushType
  class StructureGeneratorTest < Rails::Generators::TestCase
    tests StructureGenerator
    destination Rails.root.join('tmp/generators')

    before :all do
      prepare_destination
      run_generator ['location', 'foo', 'bar:text']
    end

    it { assert_file 'app/models/location.rb', %r{class Location < PushType::Structure} }
    it { assert_file 'app/models/location.rb', %r{field :foo, :string} }
    it { assert_file 'app/models/location.rb', %r{field :bar, :text} }
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
push_type_core-0.12.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.12.0 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.12.0.beta.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.11.2 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.11.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.11.0.beta.2 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.11.0.beta.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.4 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.3 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.2 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.0 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.0.beta.5 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.10.0.beta.3 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.5 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.3 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.2 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.1 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.0 test/lib/generators/push_type/structure_generator_test.rb
push_type_core-0.9.0.beta.4 test/lib/generators/push_type/structure_generator_test.rb