teckel 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/spec/spec_helper.rb DELETED
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/setup"
4
- if ENV['COVERAGE'] == 'true'
5
- require 'simplecov'
6
- require 'simplecov_json_formatter'
7
- SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
8
- SimpleCov.start do
9
- add_filter %r{^/spec/}
10
- end
11
- end
12
-
13
- require "teckel"
14
- require "teckel/chain"
15
-
16
- RSpec.configure do |config|
17
- # Enable flags like --only-failures and --next-failure
18
- config.example_status_persistence_file_path = ".rspec_status"
19
-
20
- # Disable RSpec exposing methods globally on `Module` and `main`
21
- config.disable_monkey_patching!
22
-
23
- config.formatter = config.files_to_run.size > 1 ? :progress : :documentation
24
-
25
- config.expect_with :rspec do |c|
26
- c.syntax = :expect
27
- end
28
- end
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'dry-types'
4
- require 'dry-struct'
5
-
6
- module Types
7
- include Dry.Types()
8
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module FakeDB
4
- Rollback = Class.new(RuntimeError)
5
-
6
- def self.transaction
7
- yield
8
- rescue Rollback
9
- # doing rollback ...
10
- raise
11
- end
12
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class User
4
- def initialize(name:, age:)
5
- @name, @age = name, age
6
- end
7
- attr_reader :name, :age
8
-
9
- def save
10
- !underage?
11
- end
12
-
13
- def errors
14
- underage? ? [{ age: "underage" }] : nil
15
- end
16
-
17
- def underage?
18
- @age <= 18
19
- end
20
- end
data/spec/teckel_spec.rb DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- RSpec.describe Teckel do
4
- it "has a version number" do
5
- expect(Teckel::VERSION).not_to be nil
6
- end
7
- end