Skip to content

Commit c0cc7fd

Browse files
committed
Remove any traces of actionview
1 parent 2f0e3b4 commit c0cc7fd

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

lib/next_rails/gem_info.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
begin
2-
require "action_view"
3-
rescue LoadError
4-
puts "ActionView not available"
5-
end
6-
71
module NextRails
82
class GemInfo
9-
if defined?(ActionView)
10-
include ActionView::Helpers::DateHelper
11-
end
12-
133
class NullGemInfo < GemInfo
144
def initialize; end
155

spec/ten_years_rails/gem_info_spec.rb

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,10 @@
1919
end
2020
end
2121

22-
context "when ActionView is available" do
23-
it "returns a time ago" do
24-
expect(subject.age).to eq("about 12 hours ago")
25-
end
26-
end
27-
28-
context "when ActionView is not available" do
29-
let(:result) { now.strftime("%b %e, %Y") }
22+
let(:result) { now.strftime("%b %e, %Y") }
3023

31-
before do
32-
subject.instance_eval('undef :time_ago_in_words')
33-
end
34-
35-
it "returns a date" do
36-
expect(subject.age).to eq(result)
37-
end
24+
it "returns a date" do
25+
expect(subject.age).to eq(result)
3826
end
3927
end
4028
end

0 commit comments

Comments
 (0)