Skip to content

Commit

Permalink
Remove unused Utils.rails_version_less_than_4_1_1
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Nov 4, 2023
1 parent 0db7b10 commit 2915ae8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions lib/react_on_rails/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ def self.rails_version_less_than(version)
end
end

# rubocop:disable Naming/VariableNumber
def self.rails_version_less_than_4_1_1
rails_version_less_than("4.1.1")
end
# rubocop:enable Naming/VariableNumber

module Required
def required(arg_name)
raise ReactOnRails::Error, "#{arg_name} is required"
Expand Down
18 changes: 0 additions & 18 deletions spec/react_on_rails/utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,24 +301,6 @@ module ReactOnRails
end
end
end

describe ".rails_version_less_than_4_1_1" do
subject { described_class.rails_version_less_than_4_1_1 }

before { described_class.instance_variable_set :@rails_version_less_than, nil }

context "with Rails 4.1.0" do
before { allow(Rails).to receive(:version).and_return("4.1.0") }

it { is_expected.to be(true) }
end

context "with Rails 4.1.1" do
before { allow(Rails).to receive(:version).and_return("4.1.1") }

it { is_expected.to be(false) }
end
end
end

describe ".smart_trim" do
Expand Down

0 comments on commit 2915ae8

Please sign in to comment.