Sha256: 371d2515ed881d2f82cd6cb366aa32891f214814cf5f9721f8432192fede004a

Contents?: true

Size: 1.16 KB

Versions: 14

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

require_relative '../lib/generators/rspec_generator'
require_relative 'spec_helper'

describe RspecGenerator do
  shared_examples 'creates rspec files' do |project_name, file_name|
    it 'creates a spec file' do
      expect(File).to exist("#{project_name}/spec/#{file_name}_page_spec.rb")
    end

    it 'creates the base spec file' do
      expect(File).to exist("#{project_name}/spec/base_spec.rb")
    end
  end

  context 'with rspec and selenium' do
    include_examples 'creates rspec files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}", 'login'
  end

  context 'with rspec and watir' do
    include_examples 'creates rspec files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}", 'login'
  end

  context 'with rspec and appium android' do
    include_examples 'creates rspec files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}", 'pdp'
  end

  context 'with rspec and appium ios' do
    include_examples 'creates rspec files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}", 'pdp'
  end

  context 'with rspec and appium cross platform' do
    include_examples 'creates rspec files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}", 'pdp'
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_raider-0.5.6 spec/rspec_generator_spec.rb
ruby_raider-0.5.5 spec/rspec_generator_spec.rb
ruby_raider-0.5.4 spec/rspec_generator_spec.rb
ruby_raider-0.5.3 spec/rspec_generator_spec.rb
ruby_raider-0.5.2 spec/rspec_generator_spec.rb
ruby_raider-0.5.1 spec/rspec_generator_spec.rb
ruby_raider-0.5.0 spec/rspec_generator_spec.rb
ruby_raider-0.4.9 spec/rspec_generator_spec.rb
ruby_raider-0.4.8 spec/rspec_generator_spec.rb
ruby_raider-0.4.7 spec/rspec_generator_spec.rb
ruby_raider-0.4.6 spec/rspec_generator_spec.rb
ruby_raider-0.4.5 spec/rspec_generator_spec.rb
ruby_raider-0.4.4 spec/rspec_generator_spec.rb
ruby_raider-0.4.3 spec/rspec_generator_spec.rb