Skip to content

Commit

Permalink
Try to add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovanton committed Mar 14, 2017
1 parent 9863c09 commit 15fb64e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/integration/cli/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,17 @@ def listing
end
end
end

context "without email" do
it "returns page" do
with_project do
replace "config/environment.rb", "delivery :test", ""

server do
visit "/"
expect(page).to have_title("Hanami | The web, with simplicity")
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
RSpec.describe "Components: mailer.configuration", type: :cli do
context "without hanami-mailer" do
it "resolves mailer configuration" do
with_project do
environment_file = Pathname.new(Dir.pwd).join("config", "environment")
peplace "#{environment_file}.rb", "delivery :test", ""

require environment_file
Hanami::Components.resolve('mailer.configuration')

expect(Hanami::Components['mailer.configuration']).to be nil
end
end
end
end

0 comments on commit 15fb64e

Please sign in to comment.