-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RYS add feature to existing plugin and for this needs their Factories (…
…#23) * RYS add feature to existing plugin and for this needs their Factories * improve naming
- Loading branch information
Showing
6 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inherit_gem: | ||
easy_style: default.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
module Ryspec | ||
VERSION = '0.3.0' | ||
|
||
VERSION = '0.4.0' | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# encoding: utf-8 | ||
|
||
$:.push File.expand_path('lib', __dir__) | ||
$LOAD_PATH.push File.expand_path('lib', __dir__) | ||
require 'ryspec/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'ryspec' | ||
s.version = Ryspec::VERSION | ||
s.authors = ['Ondřej Moravčík'] | ||
s.email = ['info@easysoftware.com'] | ||
s.homepage = 'https://easysoftware.com' | ||
s.summary = 'Summary of Ryspec.' | ||
s.description = 'Description of Ryspec.' | ||
s.license = 'GPL-2.0-or-later' | ||
s.name = 'ryspec' | ||
s.version = Ryspec::VERSION | ||
s.authors = ['Ondřej Moravčík', 'Lukáš Pokorný'] | ||
s.email = ['info@easysoftware.com'] | ||
s.homepage = 'https://github.com/easysoftware/ryspec' | ||
s.summary = 'RSpec basics for RYSy.' | ||
s.description = 'Define spec_helper, Redmine factories and some helpers for RSpec in RYSy ecosystem.' | ||
s.license = 'GPL-2.0-or-later' | ||
|
||
s.metadata['allowed_push_host'] = 'https://gems.easysoftware.com' | ||
|
||
s.files = Dir['{app,config,db,lib,patches}/**/{*,.*}', 'Rakefile', 'README.md', 'gems.rb'] | ||
s.test_files = Dir['spec/**/*'] | ||
|
||
s.add_dependency 'rys' | ||
s.add_dependency 'rspec-rails', '~> 5.0' | ||
s.add_dependency 'capybara' | ||
s.add_dependency 'database_cleaner-active_record', '~> 2.0.0' | ||
s.add_dependency 'factory_bot_rails', '~> 6.1' | ||
s.add_dependency 'rspec-rails', '~> 5.0' | ||
s.add_dependency 'rys' | ||
s.add_dependency 'webmock', '~> 3.12.2' | ||
|
||
s.add_development_dependency 'easy_style' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RSpec.describe Ryspec do | ||
describe ".require_factory" do | ||
it "undefine plugin raise error" do | ||
expect { described_class.require_factory :dummy_plugin }.to raise_error Redmine::PluginNotFound | ||
end | ||
|
||
it "plugin exist but factory file not" do | ||
allow(Redmine::Plugin).to receive(:find).and_return double("plugin", directory: Rails.root.join("plugins/easy_contacts")) | ||
expect { described_class.require_factory :easy_contacts }.to raise_error ArgumentError | ||
end | ||
end | ||
end |