-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start making builders more configurable
A user may or may not use all builders. This gets us closer to making this configurable from a settings file. (But not quite.)
- Loading branch information
1 parent
630d187
commit 4af2b10
Showing
8 changed files
with
73 additions
and
6 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
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
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 |
---|---|---|
|
@@ -97,4 +97,10 @@ | |
end | ||
end | ||
end | ||
|
||
describe ".name" do | ||
subject { described_class.name } | ||
|
||
it { is_expected.to eq :html } | ||
end | ||
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 |
---|---|---|
|
@@ -42,5 +42,10 @@ | |
end | ||
end | ||
end | ||
end | ||
|
||
describe ".name" do | ||
subject { described_class.name } | ||
|
||
it { is_expected.to eq :rss } | ||
end | ||
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,28 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe Lifer::Builder do | ||
describe ".find" do | ||
subject { described_class.find name } | ||
|
||
context "when a builder with the given name exists" do | ||
let(:name) { :html } | ||
|
||
it { is_expected.to eq Lifer::Builder::HTML } | ||
end | ||
|
||
context "when a builder with the given name does not exist" do | ||
let(:name) { :doesntexist } | ||
|
||
it "raises an error" do | ||
expect { subject } | ||
.to raise_error StandardError, "no builder with name \"doesntexist\"" | ||
end | ||
end | ||
end | ||
|
||
describe ".name" do | ||
subject { described_class.name } | ||
|
||
it { is_expected.to eq :builder } | ||
end | ||
end |