Sha256: bc15826504c06b287efb7d8953f061236b03a35a9cf8ec9e61db5b772225da8e

Contents?: true

Size: 744 Bytes

Versions: 4

Compression:

Stored size: 744 Bytes

Contents

require 'spec_helper'
require 'retrospec'

describe "<%= plugin_name %>" do
  let(:plugin) do
    Retrospec::Plugins::V1::<%= capitalized_plugin_name %>.new('/tmp/testplugin_dir', {:name => 'testplugin', :config1 => 'test'})
  end

  it "can create plugin instance" do
    expect(plugin).to be_a Retrospec::Plugins::V1::<%= capitalized_plugin_name %>
  end

  it 'can get config data' do
    expect(plugin.config_data[:config1]).to eq('test')
  end

  it 'can module_path from context' do
    expect(plugin.context.module_path).to eq('/tmp/testplugin_dir')
  end

  it 'can get module name' do
    expect(plugin.context.module_name).to eq('testplugin')
  end

  it 'can run without error' do
    expect{plugin.run}.to_not raise_error
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
retrospec-plugingen-0.2.2 lib/retrospec/plugins/v1/plugin/templates/module_files/spec/unit/plugin_spec.rb.retrospec.erb
retrospec-plugingen-0.2.1 lib/retrospec/plugins/v1/plugin/templates/module_files/spec/plugin_spec.rb.erb
retrospec-plugingen-0.2.0 lib/retrospec/plugins/v1/plugin/templates/module_files/spec/plugin_spec.rb.erb
retrospec-plugingen-0.1.0 lib/retrospec/plugins/v1/plugin/templates/module_files/spec/plugin_spec.rb.erb