GithubHelp home page GithubHelp logo

Comments (6)

AdedayoOpeyemi avatar AdedayoOpeyemi commented on July 17, 2024 1

Hi,
Thanks for the clarification. AdedayoOpeyemi/Ruby-capstone-project#2 is the link to the Pull request. As stated I had to use the include keyword to make it work.

from linters-config.

bolah2009 avatar bolah2009 commented on July 17, 2024

Hi @AdedayoOpeyemi, thanks for opening this issue. Is this the PR AdedayoOpeyemi/Ruby-capstone-project#2 to failing GHA?

from linters-config.

AdedayoOpeyemi avatar AdedayoOpeyemi commented on July 17, 2024

Hi @bolah2009, I am not sure I understand your question

from linters-config.

bolah2009 avatar bolah2009 commented on July 17, 2024

Hi @AdedayoOpeyemi sorry for not clarifying myself. The failed GitHub Action (GHA) that you posted the error messages, am asking which of your Pull request (PR) is the error from?

Would be better to see the whole project for more context.
Thanks

from linters-config.

bolah2009 avatar bolah2009 commented on July 17, 2024

Okay, thanks @AdedayoOpeyemi

from linters-config.

shshamim63 avatar shshamim63 commented on July 17, 2024

Hi @AdedayoOpeyemi 👋
I just check the issue you were having, well the way you have generated tests for your modules. actually needs some refactoring. Whenever you are adding tests for modules that are included in a class you should test them by generating the class instance. If you refactor the test suppose for afrer_colon_spec.rb in the following way it will not generate the error.

require_relative '../lib/after_colon.rb'
require_relative '../lib/linter'

describe AfterColon do
  let(:file) { './style.css' }
  let(:error_array) { [] }
  let(:cont) { File.readlines('./style.css') }
  let(:checker) { LinterApp.new }

  describe '#after_colon_check' do
    it 'returns nil when all the colons on line has the right afterspace' do
      expect(checker.after_colon_check(cont[34], 34)).to eql(nil)
    end

    it 'It returns an error message when the colons do not have the right afterspace' do
      checker.after_colon_check(cont[136], 136)
      expect(checker.after_colon_check(cont[136], 136)).to eq("\e[0;36;49mNo space after colon on line 137\e[0m")
    end

    it 'It returns nil if the line passed conly contains a psuedocode' do
      expect(checker.after_colon_check(cont[113], 113)).to eq(nil)
    end

    it 'It returns an error if there is no space after the colon' do
      checker.after_colon_check(cont[110], 110)
      expect(checker.after_colon_check(cont[110], 110)).to eq("\e[0;36;49mNo space after colon on line 111\e[0m")
    end
  end
end

This will not render any error while doing linter check. For more info on how to test modules please go through this article

from linters-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.