Skip to content

Commit

Permalink
Fix tests & run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Barone committed Aug 8, 2024
1 parent fb1ff2e commit ddeb3ca
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/generators/storybook/example_generator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'rails/generators'
require "rails/generators"

class Storybook::ExampleGenerator < Rails::Generators::Base
def install_view_components
Expand Down
6 changes: 3 additions & 3 deletions lib/generators/storybook/install_generator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'rails/generators'
require "rails/generators"

class Storybook::InstallGenerator < Rails::Generators::Base
def install_storybook
Expand Down Expand Up @@ -45,8 +45,8 @@ def create_storybook_layout_slim
def update_storybook
# Main.js
insert_into_file ".storybook/main.js", "\n \"@storybook/server\",", after: "addons: ["
gsub_file '.storybook/main.js', "*.stories.@(js|jsx|mjs|ts|tsx)", "*.stories.@(js|jsx|mjs|ts|tsx|json)"
gsub_file '.storybook/main.js', "@storybook/react-webpack5", "@storybook/server-webpack5"
gsub_file ".storybook/main.js", "*.stories.@(js|jsx|mjs|ts|tsx)", "*.stories.@(js|jsx|mjs|ts|tsx|json)"
gsub_file ".storybook/main.js", "@storybook/react-webpack5", "@storybook/server-webpack5"

# Preview.js
base_url = "http://localhost:3000/rails/view_components"
Expand Down
1 change: 0 additions & 1 deletion lib/storybook/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
module Storybook
VERSION = "0.1.0"
end

2 changes: 1 addition & 1 deletion rails-storybook.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = [ "lib" ]


spec.add_dependency "rails", "~> 7.0"
spec.add_dependency "slim", "~> 5.2"
spec.add_development_dependency "rails", "~> 7.0"
Expand Down
8 changes: 3 additions & 5 deletions spec/rails/storybook_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
RSpec.describe Rails::Storybook do
RSpec.describe Storybook do
it "has a version number" do
expect(Rails::Storybook::VERSION).not_to be nil
expect(Storybook::VERSION).not_to be nil
end

it "does something useful" do
expect(false).to eq(true)
end
it "has meaningful tests"
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "bundler/setup"
require "rails/storybook"
require "storybook"

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
Expand Down

0 comments on commit ddeb3ca

Please sign in to comment.