I'm just starting out with scala here and I'm finding some of the syntax confusing. For example from the scalatest main page
class ExampleSpec extends FlatSpec with Matchers {
"A Stack" should "pop values in last-in-first-out order" in {...}
}
As I read it that means "should" is a method of string "A stack"? If that is right, how does that happen? It doesn't seem to work from the scala prompt
scala> class ExampleSpec {
| "A Stack" should "pop values"
| }
<console>:9: error: value should is not a member of String
"A Stack" should "pop values"
If "should" is not a method of string "A Stack" in the above snippet then how am I to read the snippet correctly? What is "should" and how does it relate to the string? Any clues?