Skip to content

Commit

Permalink
Fix typos and missing EOF newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-berbel committed Jun 7, 2018
1 parent feaf186 commit 0da218d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def corollary_box(with_corollary)

def assistance_box(assignment)
if assignment.tips.present?
%Q{<div class="mu-tips-box">
%Q{<div class="mu-tips-box">
#{Mumukit::Assistant::Narrator.random.compose_explanation_html assignment.tips}
</div>}.html_safe
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/assistable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def assist_with(assignment)
# all the assistence process when there are no rules
assistance_rules.blank? ? [] : assistant.assist_with(assignment)
end
end
end
2 changes: 1 addition & 1 deletion lib/mumuki/laboratory/locales/narrator.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ en:
middle_2: Also, %{tip}.
ending_0: Finally, %{tip}.
ending_1: Finally, %{tip}.
ending_2: Finally, %{tip}.
ending_2: Finally, %{tip}.
2 changes: 1 addition & 1 deletion lib/mumuki/laboratory/locales/narrator.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ es:
middle_2: "Por otro lado, %{tip}."
ending_0: "Por último, %{tip}."
ending_1: "Ah, algo más: %{tip}."
ending_2: "Y para cerrar, %{tip}."
ending_2: "Y para cerrar, %{tip}."
2 changes: 1 addition & 1 deletion lib/mumuki/laboratory/status/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def errored?
end

# False if and only if this status
# is `Mumuki::Laboratory::Status`
# is `Mumuki::Laboratory::Status::Passed`
def should_retry?
true
end
Expand Down
4 changes: 2 additions & 2 deletions lib/mumukit/assistant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(rules)
@rules = rules
end

# Provides tips for the studen for the given submission,
# Provides tips for the student for the given submission,
# based on the `rules`.
def assist_with(submission)
@rules
Expand All @@ -27,4 +27,4 @@ def self.parse(rules)

require_relative './assistant/rule'
require_relative './assistant/message'
require_relative './assistant/narrator'
require_relative './assistant/narrator'
2 changes: 1 addition & 1 deletion lib/mumukit/assistant/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def self.parse(text_or_alternatives)
raise "Wrong message format #{text_or_alternatives}"
end
end
end
end
2 changes: 1 addition & 1 deletion lib/mumukit/assistant/rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ def matches?(submission)
super && submission.result.include?(@text)
end
end
end
end
4 changes: 2 additions & 2 deletions spec/models/assistant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
},
{
when: { error_contains: 'Unrecognized token %' },
then: 'Remeber you have to use `mod`, not `%`'
then: 'Remember you have to use `mod`, not `%`'
}
]}

context 'when submission has errored with expected message' do
let(:submission) { struct status: :errored, result: 'Illegal start of sentence. Unrecognized token %' }
it do
expect(assistant.assist_with submission).to eq ['Oops, it did not compile', 'Remeber you have to use `mod`, not `%`']
expect(assistant.assist_with submission).to eq ['Oops, it did not compile', 'Remember you have to use `mod`, not `%`']
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/models/narrator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
let(:tips) { [
'check you have not mispelled `product`',
'check that you are using composition',
'remeber that `sum` must work with both `Int`s and `Float`s'
'remember that `sum` must work with both `Int`s and `Float`s'
] }

it { expect(narrator.retry_phrase).to eq 'Let\'s try again!' }
it { expect(narrator.explanation_introduction_phrase).to eq 'Oops, it didn\'t work :frowning:.' }
it { expect(narrator.compose_explanation tips).to eq "Oops, it didn\'t work :frowning:.\n\n"+
"Check you have not mispelled `product`.\n\n"+
"Also, check that you are using composition.\n\n" +
"Finally, remeber that `sum` must work with both `Int`s and `Float`s.\n\n" +
"Finally, remember that `sum` must work with both `Int`s and `Float`s.\n\n" +
"Let's try again!\n" }
end

Expand Down Expand Up @@ -61,4 +61,4 @@
end
end
end
end
end

0 comments on commit 0da218d

Please sign in to comment.