Sha256: 3f5b188d804e26c45450676dca28d8b9c86ad788c1094da80fb9fdc4a1781242

Contents?: true

Size: 525 Bytes

Versions: 6

Compression:

Stored size: 525 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module Webmock
        def self.prepended(base)
          base.class_option :webmock,
            type: :boolean,
            default: true,
            desc: 'Install webmock to prevent external HTTP requests in tests'
        end

        def finish_template
          return super unless options[:webmock]
          gem 'webmock', group: :test
          copy_file 'webmock.rb', 'spec/support/webmock.rb'
          super
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/stationed/generators/plugins/webmock.rb
stationed-0.5.0 lib/stationed/generators/plugins/webmock.rb
stationed-0.4.0 lib/stationed/generators/plugins/webmock.rb
stationed-0.3.0 lib/stationed/generators/plugins/webmock.rb
stationed-0.2.0 lib/stationed/generators/plugins/webmock.rb
stationed-0.1.0 lib/stationed/generators/plugins/webmock.rb