Skip to content

Commit

Permalink
Sus
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Sep 1, 2022
1 parent 1263d7e commit 8e001bf
Show file tree
Hide file tree
Showing 26 changed files with 451 additions and 548 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run specs
run: bundle exec rspec
- name: Run tests
run: bundle exec sus

docs:
runs-on: ubuntu-latest
Expand Down
22 changes: 10 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

source "https://rubygems.org"

# Specify your gem's dependencies in phlex.gemspec
gemspec

gem "rake", "~> 13.0"
gem "rake"

gem "rspec"
gem "benchmark-memory"
gem "rspec-html-matchers"
gem 'combustion', '~> 1.3'
gem "rails"
gem "listen"
gem "webrick"
gem "benchmark-ips"
gem "sus", group: [:test]
gem "rails", group: [:test]
gem "rouge", group: [:docs]
gem "htmlbeautifier", group: [:docs]
gem "redcarpet", group: [:docs]
gem "listen", group: [:docs]
gem "webrick", group: [:docs]
gem "zeitwerk", group: [:docs]
gem "redcarpet", group: [:docs]
gem 'combustion', group: [:test]
gem "benchmark-ips"
gem "htmlbeautifier", group: [:docs]
gem "benchmark-memory"
33 changes: 10 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ GEM
thor (>= 0.14.6)
concurrent-ruby (1.1.10)
crass (1.0.6)
diff-lcs (1.5.0)
digest (3.1.0)
erubi (1.11.0)
ffi (1.15.5)
Expand All @@ -103,7 +102,8 @@ GEM
memory_profiler (1.0.0)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.16.2)
mini_portile2 (2.8.0)
minitest (5.16.3)
net-imap (0.2.3)
digest
net-protocol
Expand All @@ -119,6 +119,9 @@ GEM
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-darwin)
Expand Down Expand Up @@ -156,28 +159,13 @@ GEM
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
rouge (3.30.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-html-matchers (0.10.0)
nokogiri (~> 1)
rspec (>= 3.0.0.a)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
strscan (3.0.4)
sus (0.12.2)
thor (1.2.1)
timeout (0.3.0)
tzinfo (2.0.5)
Expand All @@ -197,16 +185,15 @@ PLATFORMS
DEPENDENCIES
benchmark-ips
benchmark-memory
combustion (~> 1.3)
combustion
htmlbeautifier
listen
phlex!
rails
rake (~> 13.0)
rake
redcarpet
rouge
rspec
rspec-html-matchers
sus
webrick
zeitwerk

Expand Down
4 changes: 2 additions & 2 deletions bench.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require "phlex"
require "benchmark/ips"

require_relative "examples/page"
require_relative "examples/layout"
require_relative "fixtures/page"
require_relative "fixtures/layout"

puts RUBY_DESCRIPTION

Expand Down
16 changes: 16 additions & 0 deletions fixtures/component_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

module ComponentHelper
def self.extended(parent)
parent.instance_exec do
let(:output) { example.call }
let(:example) { component.new }
end
end

def component(&block)
let :component do
Class.new(Phlex::Component, &block)
end
end
end
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions fixtures/test_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require "phlex"
require "bundler"
Bundler.require :test
Combustion.initialize! :action_controller
require "component_helper"
1 change: 0 additions & 1 deletion spec/internal/app/views/articles/_article.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion spec/internal/app/views/shared/_content.html.erb

This file was deleted.

Loading

0 comments on commit 8e001bf

Please sign in to comment.