Skip to content

Commit

Permalink
Remove javascript assets
Browse files Browse the repository at this point in the history
  • Loading branch information
candanedo committed Feb 28, 2024
1 parent 3e4b789 commit 6ade8d0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.
8 changes: 0 additions & 8 deletions lib/use_paragon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@
module UseParagon
# Configuration from initializer
class << self
def load!
register_rails_engine if rails?
end

def configuration
@configuration ||= Configuration.new
end

def configure
yield(configuration)
end

def register_rails_engine
require "use_paragon/engine"
end
end

class Error < StandardError; end
Expand Down
43 changes: 0 additions & 43 deletions spec/use_paragon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@
expect(UseParagon::VERSION).not_to be nil
end

describe ".load!" do
context "when running in a Rails environment" do
it "registers Rails engine" do
allow(UseParagon).to receive(:rails?).and_return(true)
expect(UseParagon).to receive(:register_rails_engine)
UseParagon.load!
end
end

context "when not running in a Rails environment" do
it "does not register Rails engine" do
allow(UseParagon).to receive(:rails?).and_return(false)
expect(UseParagon).not_to receive(:register_rails_engine)
UseParagon.load!
end
end
end

describe ".configuration" do
it "returns a configuration object" do
expect(UseParagon.configuration).to be_an_instance_of(UseParagon::Configuration)
Expand All @@ -34,29 +16,4 @@
expect { |block| UseParagon.configure(&block) }.to yield_with_args(UseParagon.configuration)
end
end

# Investigate why this test is failing
describe ".load!" do
context "when Rails is present" do
before do
allow(UseParagon).to receive(:rails?).and_return(true)
end

it "registers the Rails engine" do
expect(UseParagon).to receive(:register_rails_engine)
UseParagon.load!
end
end

context "when Rails is not present" do
before do
allow(UseParagon).to receive(:rails?).and_return(false)
end

it "does not register the Rails engine" do
expect(UseParagon).not_to receive(:register_rails_engine)
UseParagon.load!
end
end
end
end
2 changes: 0 additions & 2 deletions vendor/assets/javascripts/useparagon/connect.js

This file was deleted.

0 comments on commit 6ade8d0

Please sign in to comment.