dry-web-roda 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +0,0 @@
1
- require "rack/test"
2
-
3
- RSpec.configure do |config|
4
- config.include Rack::Test::Methods, type: :request
5
- end
@@ -1,28 +0,0 @@
1
- require "tempfile"
2
-
3
- module RSpec
4
- module Support
5
- def self.silently(cmd, via: :system)
6
- out = Tempfile.new("dry-web-roda-out")
7
- # RSpec::Support::Env.env
8
- result = ::Kernel.__send__(via, cmd, out: out.path, err: out.path)
9
-
10
- return if result
11
-
12
- out.rewind
13
- fail "#{cmd} failed:\n#{out.read}" # rubocop:disable Style/SignalException
14
- end
15
-
16
- module Silently
17
- private
18
-
19
- def silently(*args)
20
- Support.silently(*args)
21
- end
22
- end
23
- end
24
- end
25
-
26
- RSpec.configure do |config|
27
- config.include RSpec::Support::Silently, type: :cli
28
- end
@@ -1,33 +0,0 @@
1
- require "dry/web/roda/generators/inflections"
2
-
3
- RSpec.describe Dry::Web::Roda::Generators::Inflections do
4
- subject(:inflections) { described_class }
5
-
6
- describe ".underscored_name" do
7
- it "leaves an already underscored name" do
8
- expect(inflections.underscored_name("my_app")).to eq "my_app"
9
- end
10
-
11
- it "leaves a name without any sort of delimiters" do
12
- expect(inflections.underscored_name("myapp")).to eq "myapp"
13
- end
14
-
15
- it "converts a dashed name" do
16
- expect(inflections.underscored_name("my-app")).to eq "my_app"
17
- end
18
- end
19
-
20
- describe ".camel_cased_name" do
21
- it "leaves an already camel cased name" do
22
- expect(inflections.camel_cased_name("MyApp")).to eq "MyApp"
23
- end
24
-
25
- it "converts a dashed name" do
26
- expect(inflections.camel_cased_name("my-app")).to eq "MyApp"
27
- end
28
-
29
- it "converts an underscored name" do
30
- expect(inflections.camel_cased_name("my_app")).to eq "MyApp"
31
- end
32
- end
33
- end